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
output: fix logic error #8530
output: fix logic error #8530
Conversation
The logical error may have been made here. Comparison with the upper bound of the variable type does not make sense. It may be worth adding the cast of one of the multiplication operands to the 64-bit type for avoiding overflow Found by Security Code with Svace static analyzer Bug: OISF#5789 Signed-off-by: Maxim Korotkov <m.korotkov@securitycode.ru>
@victorjulien hi, can you explain why tests were failing please? I don't have idea |
Probably needs a rebase to master. The failing test was merged yesterday following a fix in master. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #8530 +/- ##
==========================================
- Coverage 81.95% 81.90% -0.05%
==========================================
Files 967 967
Lines 278373 278373
==========================================
- Hits 228129 228001 -128
- Misses 50244 50372 +128
Flags with carried forward coverage won't be shown. Click here to find out more. |
Tests pass now :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my inline comment :)
yep, i saw it, I'll do it a little later |
Add debug validation to catch any change.
…ps://github.com/ProjectMutilation/suricata into output-tx-fix-logic-error-for-avoiding-overflow
i'll create new pr with clean history :) |
Followed by: #8547 |
The logical error may have been made here. Comparison with the upper
bound of the variable type does not make sense. It may be worth adding
the cast of one of the multiplication operands to the 64-bit type for
avoiding overflow
Found by Security Code with Svace static analyzer
Bug: #5789
Signed-off-by: Maxim Korotkov m.korotkov@securitycode.ru
Make sure these boxes are signed before submitting your Pull Request -- thank you.
Link to redmine ticket: https://redmine.openinfosecfoundation.org/issues/5789
Describe changes:
#suricata-verify-pr:
#suricata-verify-repo:
#suricata-verify-branch:
#suricata-update-pr:
#suricata-update-repo:
#suricata-update-branch:
#libhtp-pr:
#libhtp-repo:
#libhtp-branch: