vcl/source/filter/itiff/itiff.cxx      |   11 ++++++++++-
 vcl/source/filter/svm/SvmConverter.cxx |    2 ++
 2 files changed, 12 insertions(+), 1 deletion(-)

New commits:
commit daa589af6a7c8ad6bdb273fda949553ad508bd9e
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Aug 6 20:19:34 2023 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Mon Aug 7 11:24:14 2023 +0200

    ofz#57493 Timeout
    
    the oss-fuzzer has gotten itself into that nasty state where it
    can't reproduce the original problem (because its fixed) but keeps
    finding other unreproducible ones that don't allow the fixed one
    to get closed. Disable this part of the fuzzer for a while so the
    original issue can close and then we can reenable and new findings will
    be recorded as a new fresh bug.
    
    Change-Id: Ie73c5c50a850a0ac6ea51345f6478f5750f8248e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155385
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/vcl/source/filter/svm/SvmConverter.cxx 
b/vcl/source/filter/svm/SvmConverter.cxx
index ea6dc961a659..48e5a29f5a31 100644
--- a/vcl/source/filter/svm/SvmConverter.cxx
+++ b/vcl/source/filter/svm/SvmConverter.cxx
@@ -1274,6 +1274,7 @@ bool TestImportSVM(SvStream& rStream)
     GDIMetaFile aGDIMetaFile;
     SvmReader aReader(rStream);
     aReader.Read(aGDIMetaFile);
+#if 0
     ScopedVclPtrInstance<VirtualDevice> aVDev;
     try
     {
@@ -1283,6 +1284,7 @@ bool TestImportSVM(SvStream& rStream)
     {
         return false;
     }
+#endif
     return true;
 }
 
commit d384da42a0f710040fffcf12120e8f81e99ac56a
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Aug 6 19:45:34 2023 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Mon Aug 7 11:24:06 2023 +0200

    ofz: Use-of-uninitialized-value
    
    For tdf#149417 we generally allow one short read for fidelity with the
    old parser that this replaced. But don't allow that for new format
    variations that the old parser didn't handle so we don't take libtiff
    into uncharted territory.
    
    Change-Id: I8d2d6954257a63a56d201eaed6510fcc38f9a5ca
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155384
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/vcl/source/filter/itiff/itiff.cxx 
b/vcl/source/filter/itiff/itiff.cxx
index bdbf0309e296..39bc51a00860 100644
--- a/vcl/source/filter/itiff/itiff.cxx
+++ b/vcl/source/filter/itiff/itiff.cxx
@@ -222,7 +222,16 @@ bool ImportTiffGraphicImport(SvStream& rTIFF, Graphic& 
rGraphic)
             break;
 
         std::vector<uint32_t> raster(nPixelsRequired);
-        aContext.bAllowOneShortRead = true;
+
+        uint16_t compression(COMPRESSION_NONE);
+        const bool bNewCodec = TIFFGetField(tif, TIFFTAG_COMPRESSION, 
&compression) == 1 &&
+                               compression >= COMPRESSION_ZSTD; // >= 50000 at 
time of writing
+        // For tdf#149417 we generally allow one short read for fidelity with 
the old
+        // parser that this replaced. But don't allow that for new format 
variations
+        // that the old parser didn't handle so we don't take libtiff into 
uncharted
+        // territory.
+        aContext.bAllowOneShortRead = !bNewCodec;
+
         if (TIFFReadRGBAImageOriented(tif, w, h, raster.data(), 
ORIENTATION_TOPLEFT, 1))
         {
             Bitmap bitmap(Size(w, h), vcl::PixelFormat::N24_BPP);

Reply via email to