com php-src: Merge branch 'PHP-7.1': ext/gd/libgd/gd_gd2. c

From: Date: Tue, 17 Jan 2017 08:36:42 +0000
Subject: com php-src: Merge branch 'PHP-7.1': ext/gd/libgd/gd_gd2. c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-96762@lists.php.net to get a copy of this message
Commit: 23db1ce3ba2bdee1e60fb02f54cacc15bc02ff28 Author: Anatol Belski <ab@php.net> Tue, 17 Jan 2017 09:36:42 +0100 Parents: 3d84aef55d88753638a5692a98b1ad5dc0e7c242 cea050b8da98e0335fb24919814603e7c130ae82 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=23db1ce3ba2bdee1e60fb02f54cacc15bc02ff28 Log: Merge branch 'PHP-7.1' * PHP-7.1: Fix #73869: Signed Integer Overflow gd_io.c Fix #73868: DOS vulnerability in gdImageCreateFromGd2Ctx() Bugs: https://bugs.php.net/73869 https://bugs.php.net/73868 Changed paths: MM ext/gd/libgd/gd_gd2.c Diff: diff --cc ext/gd/libgd/gd_gd2.c index 1808e72,3eba6b3..00017a5 --- a/ext/gd/libgd/gd_gd2..c +++ b/ext/gd/libgd/gd_gd2.c @@@ -134,11 -133,15 +134,15 @@@ static int _gd2GetHeader(gdIOCtxPtr in if (gdGetWord(ncy, in) != 1) { goto fail1; } - GD2_DBG(php_gd_error("%d Chunks vertically", *ncy)); + GD2_DBG(gd_error("%d Chunks vertically", *ncy)); if (gd2_compressed(*fmt)) { + if (*ncx <= 0 || *ncy <= 0 || *ncx > INT_MAX / *ncy) { + GD2_DBG(printf ("Illegal chunk counts: %d * %d\n", *ncx, *ncy)); + goto fail1; + } nc = (*ncx) * (*ncy); - GD2_DBG(php_gd_error("Reading %d chunk index entries", nc)); + GD2_DBG(gd_error("Reading %d chunk index entries", nc)); if (overflow2(sizeof(t_chunk_info), nc)) { goto fail1; }

« previous php.cvs (#96762) next »