# HG changeset patch # User Michael Nestler # Date 1458911370 25200 # Node ID b4ad53d98db3f52e9fa3c1f1638ab6143fee4355 # Parent 541cf9eb030226217ea44c0a00c5ea1fae4a7cef 22642764 problem in UTILITY/PHP diff -r 541cf9eb0302 -r b4ad53d98db3 components/php/php56/patches/CVE-2016-1903.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/php/php56/patches/CVE-2016-1903.patch Fri Mar 25 06:09:30 2016 -0700 @@ -0,0 +1,18 @@ +# Source: upstream +# see: https://bugs.php.net/bug.php?id=70976 +# this fix (adapted): +# https://github.com/php/php-src/commit/2baeb167a08b0186a885208bdc8b5871f1681dc8.diff + +diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c +--- a/ext/gd/libgd/gd_interpolation.c ++++ b/ext/gd/libgd/gd_interpolation.c +@@ -2154,7 +2154,7 @@ gdImagePtr gdImageRotateInterpolated(const gdImagePtr src, const float angle, in + { + const int angle_rounded = (int)floor(angle * 100); + +- if (bgcolor < 0) { ++ if (bgcolor < 0 || (!src->trueColor && bgcolor >= gdMaxColors)) { + return NULL; + } + +