[gs-commits] rev 11860 - trunk/gs/base

robin at ghostscript.com robin at ghostscript.com
Wed Oct 27 11:18:38 UTC 2010


Author: robin
Date: 2010-10-27 11:18:38 +0000 (Wed, 27 Oct 2010)
New Revision: 11860

Modified:
   trunk/gs/base/gdevtifs.c
Log:
Fix Bug 691726, memory corruption in tiffscaled device when
(resolution % DownScaleFactor) != 0.

The problem specifically occurred when the page had 'stray' lines at the end.
The code I had written to cope with this was calling the Tiff writing code
with the wrong row number, causing the tiff lib to try to extend the buffer.
This, it seems, is a bad thing.

The miscalculation is fixed here, and the bug goes away.

No expected cluster differences.



Modified: trunk/gs/base/gdevtifs.c
===================================================================
--- trunk/gs/base/gdevtifs.c	2010-10-26 23:54:13 UTC (rev 11859)
+++ trunk/gs/base/gdevtifs.c	2010-10-27 11:18:38 UTC (rev 11860)
@@ -559,6 +559,7 @@
     }
     if (n != 0)
     {
+        row--;
         while (n != factor)
         {
             memset(data + max_size * n, 0, max_size);



More information about the gs-commits mailing list