Skip to content

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>
*/
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