# HG changeset patch # User Rich Burridge # Date 1454545313 28800 # Node ID 6c9d04f8f7a9c3a33d9a18849a866c36b231d441 # Parent a3366751f9c633485237932ebd0ce344abb76b36 22650536 problem in PYTHON-MOD/PIL diff -r a3366751f9c6 -r 6c9d04f8f7a9 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 +@@ -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], +@@ -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],