Blame SOURCES/0001-pixops-Chane-variable-type.patch

159db5
From 3df91dc6c6f8d1421e9c8756959280de792af77a Mon Sep 17 00:00:00 2001
159db5
From: Benjamin Otte <otte@redhat.com>
159db5
Date: Sat, 22 Aug 2015 17:57:23 +0200
159db5
Subject: [PATCH 1/2] pixops: Chane variable type
159db5
159db5
n_weights is used to do overflow checks. So by reducing the size to 32
159db5
bits signed we overflow earlier. This is necessary because further down
159db5
the code lots of code uses int variables to iterate over this variable
159db5
and we don't want those to overflow.
159db5
159db5
The correct fix would be to make all those variables gsize too, but
159db5
that's way more invasive and requires different checks in different
159db5
places so I'm not gonna do that now.
159db5
And as long as scale factors are not expected to reach G_MAXINT it's not
159db5
really necessary to do this change anyway.
159db5
159db5
https://bugzilla.gnome.org/show_bug.cgi?id=753908
159db5
---
159db5
 gdk-pixbuf/pixops/pixops.c | 2 +-
159db5
 1 file changed, 1 insertion(+), 1 deletion(-)
159db5
159db5
diff --git a/gdk-pixbuf/pixops/pixops.c b/gdk-pixbuf/pixops/pixops.c
159db5
index 7f2cbff..b7951c7 100644
159db5
--- a/gdk-pixbuf/pixops/pixops.c
159db5
+++ b/gdk-pixbuf/pixops/pixops.c
159db5
@@ -1272,7 +1272,7 @@ make_filter_table (PixopsFilter *filter)
159db5
   int i_offset, j_offset;
159db5
   int n_x = filter->x.n;
159db5
   int n_y = filter->y.n;
159db5
-  gsize n_weights;
159db5
+  int n_weights;
159db5
   int *weights;
159db5
 
159db5
   n_weights = SUBSAMPLE * SUBSAMPLE * n_x;
159db5
-- 
159db5
2.5.2
159db5