[gs-regression] local cluster regression a00c728c4c3ffa2392765294bc21b90b6e38496f

marcos.woehrmann at artifex.com marcos.woehrmann at artifex.com
Thu Sep 1 17:03:54 UTC 2011

a00c728 Bug 692481; partial fix - jpeg data with excess 0xFFs.
commit a00c728c4c3ffa2392765294bc21b90b6e38496f
Author: Robin Watts <Robin.Watts at artifex.com>
Date:   Thu Sep 1 17:15:41 2011 +0100

    Bug 692481; partial fix - jpeg data with excess 0xFFs.
    Ghostscript passes buffers full of data to the jpeg library. The jpeg
    library decodes one (or more) scanlines of data from this data and
    returns it to ghostscript.
    In the event that the jpeg library can't decode an entire scanline from
    the buffer supplied, it 'suspends' itself (i.e. restores its internal
    state to the beginning of the last scanline, and returns having consumed
    no data).
    This means that if we ever have a scanline of jpeg data that is too large
    to fit in the stream buffer, we will go into an infinite loop.
    This commit is a partial fix for the issue; if we return from the jpeg
    lib having consumed no data and having produced no output, we attempt to
    compact the data in the jpeg stream. We do this by compacting strings of
    0xFF bytes to a single 0xFF byte. (Strings of 0xFF bytes are forbidden by
    the spec, but are treated by the library as a single one).
    This is sufficient to solve the problem with the supplied corrupted file,
    but still leaves us vulnerable to files that have more than 0x800 bytes
    in any given single scanline.
    A proper fix would require us to spot that the buffer was 'full' and that
    the compaction process saved no bytes. Spotting that the compaction
    process saved no bytes is easy. Spotting that the buffer is 'full' is not
    currently possible as stream->cbsize is not available at the point
    where the test needs to be done.

Changed files:

Products tested: gs ls pcl xps 

New warnings:

./base/sdctd.c:110: warning: assignment discards qualifiers from pointer target type

ran 53170 tests in 1871 seconds on 9 nodes

No differences in 42121 non-pdfwrite/ps2write tests

No differences in 6631 pdfwrite tests

No differences in 4418 ps2write tests

The following 1 regression file(s) have started producing errors:
tests_private/comparefiles/Bug691783.pdf.ps.pkmraw.300.0 gs ps2write inches x6 Timeout_reading_Ghostscript_produced_PDF/PS_File


The following 8 regression file(s) had differences but matched at least once in the previous 50 runs:
tests_private/comparefiles/Bug690475.pdf.ps.ppmraw.300.0 gs ps2write peeves x6 af34c29e19ce012f71cb3713d4756ee43d6aa1d0 2 
tests_private/pdf/PDF_1.7_FTS/fts_14_1421.pdf.psdcmyk.72.0 gs meters peeves af34c29e19ce012f71cb3713d4756ee43d6aa1d0 2 
tests_private/pdf/PDF_1.7_FTS/fts_17_1702.pdf.cups.300.1 gs i7a meters af34c29e19ce012f71cb3713d4756ee43d6aa1d0 2 
tests_private/ps/ps3cet/09-34.PS.psdcmyk.72.0 gs i7a i7a fc3adb358eb5c0175fc5e24d7f275ffe2ac39fb9 3 
tests_private/ps/ps3cet/12-02.PS.psdcmyk.72.0 gs x6 x6 af34c29e19ce012f71cb3713d4756ee43d6aa1d0 2 
tests_private/ps/ps3cet/12-07C.PS.pdf.pkmraw.300.0 gs pdfwrite meters i7 b08778372c45bdf77e60db7374d1d18b6b340b10 4 
tests_private/ps/ps3cet/34_all.PS.pgmraw.300.0 gs i7b x6 b08778372c45bdf77e60db7374d1d18b6b340b10 4 
tests_private/ps/ps3cet/34_all.PS.pgmraw.300.1 gs kilometers i7a b08778372c45bdf77e60db7374d1d18b6b340b10 4 

More information about the gs-regression mailing list