Skip to content

Fix out-of-bounds write in gzungetc() - #1290

Open
ydsa wants to merge 1 commit into
madler:developfrom
ydsa:develop
Open

Fix out-of-bounds write in gzungetc()#1290
ydsa wants to merge 1 commit into
madler:developfrom
ydsa:develop

Conversation

@ydsa

@ydsa ydsa commented Jul 29, 2026

Copy link
Copy Markdown

Fix an out-of-bounds write in gzungetc() when the output buffer state is invalid.

Add a guard for the empty-output-buffer path to return -1 if state->out == NULL or state->size == 0.

Fixes #1289.

Signed-off-by: mapengyuan <mapengyuan@xfusion.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.

gzungetc(): out-of-bounds write when output buffer state is invalid

1 participant