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

Coverity fixes v4 #7173

Closed
wants to merge 4 commits into from
Closed

Conversation

catenacyber
Copy link
Contributor

Link to redmine ticket:
None, not sure it deserves one

Describe changes: patches to make coverity happy

  • Prevents a double unlock (by locking again)
  • Makes static code analyzer about a memory leak in xbits parsing (removing dead code for default switch cases)
  • Asserts all cases are covered in debuglog (PKT_IS_IPV6 or PKT_IS_IPV4)
  • fix possible null dereference in debug validation in PacketPoolDestroy

After this and #7139 (which I think is a real bug this one), there will be no more outstanding issues reported by coverity

Replaces #7169 with fixing flow unlock commit compilation

Even if the code seems unreachable for now
Coverity ID: 1502953

As we check just on the next line my_pool against NULL, we should
not dereference it, even for debug validation
@catenacyber catenacyber requested a review from a team as a code owner March 25, 2022 08:29
@catenacyber catenacyber mentioned this pull request Mar 25, 2022
@codecov
Copy link

codecov bot commented Mar 25, 2022

Codecov Report

Merging #7173 (410268c) into master (3a490fb) will increase coverage by 0.11%.
The diff coverage is 33.33%.

@@            Coverage Diff             @@
##           master    #7173      +/-   ##
==========================================
+ Coverage   78.06%   78.17%   +0.11%     
==========================================
  Files         628      628              
  Lines      185266   185265       -1     
==========================================
+ Hits       144635   144840     +205     
+ Misses      40631    40425     -206     
Flag Coverage Δ
fuzzcorpus 60.45% <33.33%> (+0.46%) ⬆️
suricata-verify 54.55% <50.00%> (-0.05%) ⬇️
unittests 63.12% <0.00%> (+<0.01%) ⬆️

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

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 6658

@catenacyber
Copy link
Contributor Author

Replaces by #7179

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.

2 participants