coverity fixes#1
Merged
Merged
Conversation
lucagiac81
approved these changes
Mar 6, 2025
asonje
added a commit
that referenced
this pull request
Jul 23, 2026
Must fix: - compress2: check IsIGZIPDeflateFinished() before EndCompressIGZIP() to detect truncated output when destLen is too small for the ISA-L trailer; input_len==sourceLen alone is insufficient since ISA-L returns COMP_OK with all input consumed but stream not in ZSTATE_END - compress2/uncompress2: simplify compress2 completeness check to !IsIGZIPDeflateFinished (subsumes input_len!=sourceLen); both paths now use a single terminal-state guard, symmetric with uncompress2 end_of_stream Should fix: - deflate(): wrap CompressIGZIP calls in null guard after InitCompressIGZIP; makes fallthrough-to-zlib explicit on init failure (both direct IGZIP path and IAA/QAT->IGZIP fallback path) - IGZIPHandleActiveStreamNoInput: change return type to void, remove dead IGZIPNoInputAction enum; caller unconditionally returns after the call - CompressIGZIP: remove unreachable else-if(ret==Z_STREAM_END) log branch; ret is only ever Z_OK or Z_STREAM_ERROR - UncompressIGZIP: same — remove unreachable else-if(ret==Z_STREAM_END) branch; ret is Z_OK, Z_NEED_DICT, or Z_DATA_ERROR Note: gz->path=IGZIP inside-else fix (should-fix #1) was already addressed in the previous commit (1874a71); no change needed here. Test: IGZIPDeflateRegressionTest.Compress2MustDetectTruncatedOutput added; all 56 IGZIP/config/logging/sharded-map tests pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
coverity fixes