ghostscript/ghostscript-incomplete-ccittfax.patch
2008-06-23 14:14:05 +00:00

13 lines
586 B
Diff

diff -up ghostscript-8.62/src/scfd.c.incomplete-ccittfax ghostscript-8.62/src/scfd.c
--- ghostscript-8.62/src/scfd.c.incomplete-ccittfax 2007-09-25 14:31:24.000000000 +0100
+++ ghostscript-8.62/src/scfd.c 2008-06-23 14:58:17.000000000 +0100
@@ -161,7 +161,7 @@ s_CFD_release(stream_state * st)
/* makeup codes efficiently, since these are always a multiple of 64. */
#define invert_data(rlen, black_byte, makeup_action, d)\
if ( rlen > qbit )\
- { *q++ ^= (1 << qbit) - 1;\
+ { if (q >= ss->lbuf) *q++ ^= (1 << qbit) - 1; else q++;\
rlen -= qbit;\
switch ( rlen >> 3 )\
{\