com php-src: Fix overflow checks: ext/gd/libgd/gd.c

From: Date: Fri, 30 Sep 2016 18:15:15 +0000
Subject: com php-src: Fix overflow checks: ext/gd/libgd/gd.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-94799@lists.php.net to get a copy of this message
Commit: c60cdac636f3a25f0300538aa3dfb60803e888a1 Author: Christoph M. Becker <cmbecker69@gmx.de> Fri, 30 Sep 2016 20:15:15 +0200 Parents: e3b889700bcbe419d18e90705dbb3d4582b59a0b Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c60cdac636f3a25f0300538aa3dfb60803e888a1 Log: Fix overflow checks We check for the proper sizeofs, cf. <https://github.com/libgd/libgd/commit/c3cf674c>. Changed paths: M ext/gd/libgd/gd.c Diff: diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index 464f8d5..508d66f 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -125,12 +125,10 @@ gdImagePtr gdImageCreate (int sx, int sy) if (overflow2(sx, sy)) { return NULL; } - if (overflow2(sizeof(unsigned char *), sy)) { return NULL; } - - if (overflow2(sizeof(unsigned char *), sx)) { + if (overflow2(sizeof(unsigned char), sx)) { return NULL; } @@ -181,12 +179,10 @@ gdImagePtr gdImageCreateTrueColor (int sx, int sy) if (overflow2(sx, sy)) { return NULL; } - - if (overflow2(sizeof(unsigned char *), sy)) { + if (overflow2(sizeof(int *), sy)) { return NULL; } - - if (overflow2(sizeof(int *), sx)) { + if (overflow2(sizeof(int), sx)) { return NULL; }

« previous php.cvs (#94799) next »