Skip to content

Fix init/state registration correctness - #67

Open
mulugetam wants to merge 1 commit into
mainfrom
fix/init-state-registration
Open

Fix init/state registration correctness#67
mulugetam wants to merge 1 commit into
mainfrom
fix/init-state-registration

Conversation

@mulugetam

Copy link
Copy Markdown
Contributor
  • deflateInit_, deflateInit2_, inflateInit_, inflateInit2_: call the original zlib init function first and only register stream settings in the map on Z_OK. Previously settings were registered unconditionally, leaving stale entries on init failure since the app would never call the corresponding End function.

  • gzeof: fall through to orig_gzeof() when the file is on the ZLIB path or has no map entry. The shim's reached_eof flag is only maintained by the accelerator read path; without this fix, gzeof always returned false for zlib-path files, causing infinite read loops.

- deflateInit_, deflateInit2_, inflateInit_, inflateInit2_: call the
  original zlib init function first and only register stream settings
  in the map on Z_OK. Previously settings were registered
  unconditionally, leaving stale entries on init failure since the app
  would never call the corresponding End function.

- gzeof: fall through to orig_gzeof() when the file is on the ZLIB
  path or has no map entry. The shim's reached_eof flag is only
  maintained by the accelerator read path; without this fix, gzeof
  always returned false for zlib-path files, causing infinite read
  loops.

Signed-off-by: Mulugeta Mammo <mulugeta.mammo@intel.com>
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.

1 participant