Skip to content

coverity fixes#1

Merged
lucagiac81 merged 1 commit into
mainfrom
coverity_fix
Mar 6, 2025
Merged

coverity fixes#1
lucagiac81 merged 1 commit into
mainfrom
coverity_fix

Conversation

@akankshakoul-dev

Copy link
Copy Markdown
Contributor

coverity fixes

@lucagiac81
lucagiac81 merged commit bb74248 into main Mar 6, 2025
@lucagiac81
lucagiac81 deleted the coverity_fix branch March 6, 2025 22:43
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants