[gs-cvs] rev 8896 - trunk/gs/src
giles at ghostscript.com
giles at ghostscript.com
Mon Jul 28 21:44:06 PDT 2008
Author: giles
Date: 2008-07-28 21:44:05 -0700 (Mon, 28 Jul 2008)
New Revision: 8896
Modified:
trunk/gs/src/scfd.c
Log:
Avoid a segfault with invalid ccitt fax data streams. Bug 689917.
Patch from Tim Waugh.
EXPECTED DIFFERENCES:
None.
Modified: trunk/gs/src/scfd.c
===================================================================
--- trunk/gs/src/scfd.c 2008-07-28 22:23:04 UTC (rev 8895)
+++ trunk/gs/src/scfd.c 2008-07-29 04:44:05 UTC (rev 8896)
@@ -161,7 +161,7 @@
/* 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 )\
{\
More information about the gs-cvs
mailing list