File gd-CVE-2016-10166.patch of Package gd.4119

Index: libgd-2.1.0/src/gd_interpolation.c
===================================================================
--- libgd-2.1.0.orig/src/gd_interpolation.c	2017-02-01 14:34:28.340298747 +0100
+++ libgd-2.1.0/src/gd_interpolation.c	2017-02-01 14:34:46.260546557 +0100
@@ -926,8 +926,7 @@ static inline LineContribType * _gdContr
 		}
 		if (overflow_error == 1 || res->ContribRow[u].Weights == NULL) {
 			unsigned int i;
-			u--;
-			for (i=0;i<=u;i++) {
+            for (i=0;i<u;i++) {
 				gdFree(res->ContribRow[i].Weights);
 			}
 			gdFree(res->ContribRow);