[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - vcl/source

Michael Meeks michael.meeks at collabora.com
Thu Jun 5 01:31:40 PDT 2014


 vcl/source/filter/graphicfilter.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 99b7ff506d148ca7d0ef9def56f4e0024e0e43ac
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Tue Jun 3 21:57:54 2014 +0100

    Avoid uninitialized memory read/compare on short reads.
    
    Change-Id: I7537f6d22780bace6ab6da06e087a3d27da8de05
    (cherry picked from commit 53db456c04ca5a1684395b60fbd6f1bed4c9c114)

diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 1f132f3..2274e83 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -704,7 +704,7 @@ static bool ImpPeekGraphicFormat( SvStream& rStream, OUString& rFormatExtension,
             {
                 nCheckSize = nStreamLen < 2048 ? nStreamLen : 2048;
                 rStream.Seek(nStreamPos);
-                rStream.Read(sExtendedOrDecompressedFirstBytes, nCheckSize);
+                nCheckSize = rStream.Read(sExtendedOrDecompressedFirstBytes, nCheckSize);
             }
 
             if(ImplSearchEntry(pCheckArray, (sal_uInt8*)"<svg", nCheckSize, 4)) // '<svg'


More information about the Libreoffice-commits mailing list