Skip to content
Permalink
Browse files Browse the repository at this point in the history
Merge branch 'PHP-5.6' into PHP-7.0
  • Loading branch information
cmb69 committed Sep 16, 2016
2 parents d2d77c0 + 46df064 commit c18263e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NEWS
Expand Up @@ -22,6 +22,8 @@ PHP NEWS
(cmb)
. Fixed bug #50194 (imagettftext broken on transparent background w/o
alphablending). (cmb)
. Fixed bug #73003 (Integer Overflow in gdImageWebpCtx of gd_webp.c). (trylab,
cmb)

- Mbstring:
. Fixed bug #66797 (mb_substr only takes 32-bit signed integer). (cmb)
Expand Down
8 changes: 8 additions & 0 deletions ext/gd/libgd/gd_webp.c
Expand Up @@ -120,6 +120,14 @@ void gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quantization)
quantization = 80;
}

if (overflow2(gdImageSX(im), 4)) {
return;
}

if (overflow2(gdImageSX(im) * 4, gdImageSY(im))) {
return;
}

argb = (uint8_t *)gdMalloc(gdImageSX(im) * 4 * gdImageSY(im));
if (!argb) {
return;
Expand Down

0 comments on commit c18263e

Please sign in to comment.