Skip to content

Commit c18263e

Browse files
committed
Merge branch 'PHP-5.6' into PHP-7.0
2 parents d2d77c0 + 46df064 commit c18263e

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ PHP NEWS
2222
(cmb)
2323
. Fixed bug #50194 (imagettftext broken on transparent background w/o
2424
alphablending). (cmb)
25+
. Fixed bug #73003 (Integer Overflow in gdImageWebpCtx of gd_webp.c). (trylab,
26+
cmb)
2527

2628
- Mbstring:
2729
. Fixed bug #66797 (mb_substr only takes 32-bit signed integer). (cmb)

ext/gd/libgd/gd_webp.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,14 @@ void gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quantization)
120120
quantization = 80;
121121
}
122122

123+
if (overflow2(gdImageSX(im), 4)) {
124+
return;
125+
}
126+
127+
if (overflow2(gdImageSX(im) * 4, gdImageSY(im))) {
128+
return;
129+
}
130+
123131
argb = (uint8_t *)gdMalloc(gdImageSX(im) * 4 * gdImageSY(im));
124132
if (!argb) {
125133
return;

0 commit comments

Comments
 (0)