Skip to content

Port fix for libgd bug 447 #17320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 3, 2025
Merged

Port fix for libgd bug 447 #17320

merged 1 commit into from
Jan 3, 2025

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Jan 1, 2025

That bug has been potentially exploitable[1], but the GD extension was not affected by that, because gdImageBmpPtr() is never called. Still it seems to be reasonable to port the fix; if only to keep bundled and external libgd synced.

[1] GHSA-hc3p-jvff-jfw5

That bug has been potentially exploitable[1], but the GD extension was
not affected by that, because `gdImageBmpPtr()` is never called.  Still
it seems to be reasonable to port the fix; if only to keep bundled and
external libgd synced.

[1] <GHSA-hc3p-jvff-jfw5>
@@ -68,8 +70,10 @@ void * gdImageBmpPtr(gdImagePtr im, int *size, int compression)
void *rv;
Copy link
Member

Choose a reason for hiding this comment

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

nit: I guess you can initialise it here saving 2 lines but that s nothing.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, but I like to stay as close to upstream as possible (I still haven't completely lost hope that at some point in time we can unbundle libgd). And there we have https://github.com/libgd/libgd/blob/77adfd27f776352e8095d98ef4902c28975d19af/src/gd_bmp.c#L88-L99

@cmb69 cmb69 merged commit 11d701a into php:master Jan 3, 2025
10 checks passed
@cmb69 cmb69 deleted the cmb/gd447 branch January 3, 2025 11:57
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.

2 participants