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

gdImageSetStyle() malfunctions for noOfPixels==0 #279

Closed
cmb69 opened this Issue Aug 2, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@cmb69
Contributor

cmb69 commented Aug 2, 2016

The issue is explained in depth in https://bugs.php.net/72709. TL;DR: libgd should also cater to this case, and not call malloc(0), which has implementation defined behavior (either it returns NULL or a valid pointer that may not be dereferenced). Instead im->style is better set to NULL, so the respective check in gdImageSetPixel() (and maybe elsewhere) is sufficient.

@cmb69 cmb69 self-assigned this Aug 2, 2016

@cmb69

This comment has been minimized.

Show comment
Hide comment
@cmb69

cmb69 Sep 19, 2016

Contributor

A respective check is already in place as of GD 2.0.29, so I'm closing this ticket.

Contributor

cmb69 commented Sep 19, 2016

A respective check is already in place as of GD 2.0.29, so I'm closing this ticket.

@cmb69 cmb69 closed this Sep 19, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment