File php-CVE-2013-7456.patch of Package php5.openSUSE_Leap_42.1_Update

Index: php-5.6.1/ext/gd/libgd/gd_interpolation.c
===================================================================
--- php-5.6.1.orig/ext/gd/libgd/gd_interpolation.c	2016-05-31 14:03:09.138120602 +0200
+++ php-5.6.1/ext/gd/libgd/gd_interpolation.c	2016-05-31 14:03:09.150120796 +0200
@@ -932,9 +932,6 @@ static inline LineContribType *_gdContri
         double dTotalWeight = 0.0;
 		int iSrc;
 
-        res->ContribRow[u].Left = iLeft;
-        res->ContribRow[u].Right = iRight;
-
         /* Cut edge points to fit in filter window in case of spill-off */
         if (iRight - iLeft + 1 > windows_size)  {
             if (iLeft < ((int)src_size - 1 / 2))  {
@@ -944,6 +941,9 @@ static inline LineContribType *_gdContri
             }
         }
 
+        res->ContribRow[u].Left = iLeft;
+        res->ContribRow[u].Right = iRight;
+
         for (iSrc = iLeft; iSrc <= iRight; iSrc++) {
             dTotalWeight += (res->ContribRow[u].Weights[iSrc-iLeft] =  scale_f_d * (*pFilter)(scale_f_d * (dCenter - (double)iSrc)));
         }
openSUSE Build Service is sponsored by