[gs-cvs] rev 7798 - trunk/gs/src
alexcher at ghostscript.com
alexcher at ghostscript.com
Sat Mar 24 21:18:57 PDT 2007
Author: alexcher
Date: 2007-03-24 21:18:56 -0700 (Sat, 24 Mar 2007)
New Revision: 7798
Modified:
trunk/gs/src/scfd.c
Log:
Clear a Valgrind warning. Initialize a buffer overshot area in CCITTFaxDecode
filter. Bug 688905.
DIFFERENCES:
No CET or Comparefiles differences.
Modified: trunk/gs/src/scfd.c
===================================================================
--- trunk/gs/src/scfd.c 2007-03-24 17:28:22 UTC (rev 7797)
+++ trunk/gs/src/scfd.c 2007-03-25 04:18:56 UTC (rev 7798)
@@ -46,7 +46,7 @@
/* Because skip_white_pixels can look as many as 4 bytes ahead, */
/* we need to allow 4 extra bytes at the end of the row buffers. */
ss->lbuf = gs_alloc_bytes(st->memory, raster + 4, "CFD lbuf");
- memset(ss->lbuf, white, raster);
+ memset(ss->lbuf, white, raster + 4); /* + 4 for Valgrind */
ss->lprev = 0;
if (ss->lbuf == 0)
return ERRC; /****** WRONG ******/
@@ -55,7 +55,7 @@
if (ss->lprev == 0)
return ERRC; /****** WRONG ******/
/* Clear the initial reference line for 2-D encoding. */
- memset(ss->lprev, white, raster);
+ memset(ss->lprev, white, raster + 4); /* + 4 for Valgrind */
/* Ensure that the scan of the reference line will stop. */
ss->lprev[raster] = 0xa0;
}
More information about the gs-cvs
mailing list