22642764 problem in UTILITY/PHP
authorMichael Nestler <Michael.Nestler@Oracle.COM>
Fri, 25 Mar 2016 06:09:30 -0700
changeset 5658 b4ad53d98db3
parent 5657 541cf9eb0302
child 5659 b6e2086f646a
22642764 problem in UTILITY/PHP
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
[email protected]@ -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;
+ 	}
+ 
+