22650536 problem in PYTHON-MOD/PIL
authorRich Burridge <rich.burridge@oracle.com>
Wed, 03 Feb 2016 16:21:53 -0800
changeset 5396 6c9d04f8f7a9
parent 5395 a3366751f9c6
child 5397 c7d00b55bd2b
22650536 problem in PYTHON-MOD/PIL
components/python/imaging/patches/pcd-buffer-overflow.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/python/imaging/patches/pcd-buffer-overflow.patch	Wed Feb 03 16:21:53 2016 -0800
@@ -0,0 +1,35 @@
+Fix a problem where the PCD decoder overruns the shuffle buffer.
+See Pillow bug #568:
+
+  https://github.com/python-pillow/Pillow/issues/568
+
+with their commit at:
+
+  https://github.com/wiredfool/Pillow/commit/ae453aa18b66af54e7ff716f4ccb33adca60afd4
+
+(Pillow is a fork of PIL).
+
+Note that there is no point in pushing the fix upstream to the
+PIL community, as that project has been unresponsive. We need
+to switch over to using Pillow at some point instead.
+
+--- Imaging-1.1.7/libImaging/PcdDecode.c.orig	2016-02-02 15:45:33.655102971 -0800
++++ Imaging-1.1.7/libImaging/PcdDecode.c	2016-02-02 15:46:00.615105790 -0800
[email protected]@ -47,7 +47,7 @@
+ 	    out[0] = ptr[x];
+ 	    out[1] = ptr[(x+4*state->xsize)/2];
+ 	    out[2] = ptr[(x+5*state->xsize)/2];
+-	    out += 4;
++	    out += 3;
+ 	}
+ 
+ 	state->shuffle((UINT8*) im->image[state->y],
[email protected]@ -62,7 +62,7 @@
+ 	    out[0] = ptr[x+state->xsize];
+ 	    out[1] = ptr[(x+4*state->xsize)/2];
+ 	    out[2] = ptr[(x+5*state->xsize)/2];
+-	    out += 4;
++	    out += 3;
+ 	}
+ 
+ 	state->shuffle((UINT8*) im->image[state->y],