Conversation
|
@catenacyber here it is |
| if (line[0] == '\n' || line [0] == '\r' || line[0] == ' ' || line[0] == '#' || line[0] == '\t') | ||
| continue; | ||
|
|
||
| while (isspace((unsigned char)line[--len])); |
There was a problem hiding this comment.
Could we simply just remove this line ?
There was a problem hiding this comment.
yes, we can. i just dont like code duplication...
There was a problem hiding this comment.
Ok : can we split the commit in 2 commits ? I think it is better to have the smallest commit possible to fix the underflow bug, then we can have another commit to deduplicate code
|
Could we have a Suricata-verify test with reputation file Did you try to fuzz this code ? |
|
NOTE: This PR may contain new authors. |
|
@catenacyber if i learn how to make "suricata verify tests" - yes, i can add it. no, i don't try to fuzz it |
|
NOTE: This PR may contain new authors. |
|
CI for C code formatting is red : https://github.com/OISF/suricata/actions/runs/25101263021/job/73551519009?pr=15256 You can fix it with |
|
@catenacyber now i can create a test, but it will not fail, just cause buffer underrun. shall i add such test? |
|
It should fail when Suricata is built with ASAN, so yes please add such a test |
done |
|
Thanks. Could you rebase to latest main and to a new PR to get green CI ? |
Remove useless while() Ticket: OISF#8500
|
Remove useless while() and simplify skiping empty lines/comments
Make sure these boxes are checked accordingly before submitting your Pull Request -- thank you.
Contribution style:
https://docs.suricata.io/en/latest/devguide/contributing/contribution-process.html
Our Contribution agreements:
https://suricata.io/about/contribution-agreement/ (note: this is only required once)
Changes (if applicable):
(including schema descriptions)
https://redmine.openinfosecfoundation.org/projects/suricata/issues
Link to ticket: https://redmine.openinfosecfoundation.org/issues/8500
Removed useless while() and simplified skiping empty lines/comments
Provide values to any of the below to override the defaults.
link to the pull request in the respective
_BRANCHvariable.SV_REPO=
SV_BRANCH=OISF/suricata-verify#3059
SU_REPO=
SU_BRANCH=