Skip to content

Commit

Permalink
Merge branch 'pull-request/296'
Browse files Browse the repository at this point in the history
  • Loading branch information
cmb69 committed Sep 16, 2016
2 parents 0423df1 + 2806adf commit 40bec0f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/gd_webp.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,14 @@ BGD_DECLARE(void) gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quality)
quality = 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 40bec0f

Please sign in to comment.