Skip to content

Fix GH-16232: bitshift overflow on wbmp file content reading. - #16239

Closed
devnexen wants to merge 1 commit into
php:PHP-8.2from
devnexen:gh16232
Closed

devnexen wants to merge 1 commit into
php:PHP-8.2from
devnexen:gh16232

Conversation

@devnexen

@devnexen devnexen commented Oct 5, 2024

Copy link
Copy Markdown
Member

No description provided.

@devnexen devnexen linked an issue Oct 5, 2024 that may be closed by this pull request
Comment thread ext/gd/libgd/wbmp.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can the second condition ever be true? i & 0x7f is at most 0x7f, ORing t hat with chk will not allow you to reach the limit.
Note that this bug was already fixed upstream by libgd/libgd@a8f1d5c

@devnexen devnexen closed this in 54973c9 Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UBSan alert in ext/gd/libgd/wbmp.c:47

2 participants