Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parsing ip-reputation data with carriage return #9357

Closed
wants to merge 1 commit into from

Conversation

thomasjwinter
Copy link
Contributor

@thomasjwinter thomasjwinter commented Aug 8, 2023

Commit e7c0f0a removed uses of atoi with a new number parsing functions. This broke parsing ip-reputation data files that contained trailing carriage returns as it was being included in the number string to convert.

Make sure these boxes are signed before submitting your Pull Request -- thank you.

Link to redmine ticket: https://redmine.openinfosecfoundation.org/issues/6243

SV_BRANCH=OISF/suricata-verify#1343

@github-actions
Copy link

github-actions bot commented Aug 8, 2023

NOTE: This PR may contain new authors:

Thomas Winter <Thomas.Winter@alliedtelesis.co.nz>

@codecov
Copy link

codecov bot commented Aug 8, 2023

Codecov Report

Merging #9357 (a19ac1b) into master (2786ccb) will decrease coverage by 0.16%.
Report is 6 commits behind head on master.
The diff coverage is 100.00%.

❗ Current head a19ac1b differs from pull request most recent head 3344b71. Consider uploading reports for the commit 3344b71 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9357      +/-   ##
==========================================
- Coverage   82.33%   82.18%   -0.16%     
==========================================
  Files         968      968              
  Lines      274136   274136              
==========================================
- Hits       225716   225293     -423     
- Misses      48420    48843     +423     
Flag Coverage Δ
fuzzcorpus 64.04% <0.00%> (-0.48%) ⬇️
suricata-verify 60.88% <100.00%> (-0.02%) ⬇️
unittests 62.89% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link
Contributor

@jufajardini jufajardini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Thomas, thanks for your fix to this! I see that the SV test created to showcase the issue passes with this PR, so I just want to point out some nit-adjustments :P

  • Could you add the ticket number to your commit message? 2786ccb exemplifies how.
  • similarly, to comply with our commit styles, can you adjust the commit title to be something like:
iprep: fix parsing ip-rep data with carriage return

This adds the module you've worked on but still keeps message within characters limits :P

  • The formatting failure should be easily fixable with clang, let us know if this is unclear to you, please.

Commit e7c0f0a removed uses of atoi with a new number parsing
functions. This broke parsing ip-reputation data files that contained
trailing carriage returns as it was being included in the number
string to convert.

Bug: OISF#6243.
@github-actions
Copy link

github-actions bot commented Aug 9, 2023

NOTE: This PR may contain new authors:

Thomas Winter <Thomas.Winter@alliedtelesis.co.nz>

@thomasjwinter
Copy link
Contributor Author

The suricata-verifry failures look to be caused by the "tests: files update for nocase fix" commit and not related to these changes.

@jufajardini
Copy link
Contributor

Tested things locally, failing tests pass with rebasing SV and Suri.

Other requested changes (commit message, clang failure have been addressed).

@catenacyber
Copy link
Contributor

catenacyber commented Aug 30, 2023

Thank you @thomasjwinter for your contribution.
Could you open a new PR that is rebased so that CI looks green ?

Copy link
Contributor

@catenacyber catenacyber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but needs to be rebased in a new PR to get CI green

@thomasjwinter
Copy link
Contributor Author

replaced by #9426

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants