[gs-bugs] [Bug 691328] non deterministic behavior in comparefiles/Bug688807

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Sat Jul 24 13:01:27 UTC 2010


SaGS <sags5495 at hotmail.com> changed:

           What    |Removed                     |Added
                 CC|                            |sags5495 at hotmail.com

--- Comment #2 from SaGS <sags5495 at hotmail.com> 2010-07-24 13:01:22 UTC ---
While working on a different bug, I had to look at the patch in revision 
11362 <http://svn.ghostscript.com/viewvc?view=rev&revision=11362>. I may be 
wrong (in which case I apologize in advance for the noise) but that patch 
seems incorrect.

If I understood correctly, the patch tries to clip the right part of the 
source bitmap if the passed width is too large. The problem is that ‘src’ 
may very well point somewhere in the middle of a scanline, so there are 
less than ‘src_raster’ bytes left for reading in the current scanline. 
For the last scanline, the code still reads past the end of the bitmap.

The ‘bytes_copy_rectangle()’ does not have sufficient information to do 
this clipping, any clipping has to be done by its callers. I suggest to 
revert the patch, and verify ‘bytes_copy_rectangle()’s callers.

Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the gs-bugs mailing list