[Libreoffice-commits] .: svtools/source

Thorsten Behrens thorsten at kemper.freedesktop.org
Mon Jul 25 09:11:39 PDT 2011


 svtools/source/filter/wmf/enhwmf.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d3a917c899f69ac2832918e14a99f4ab9cb37d6e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jul 25 18:09:37 2011 +0200

    EMF+ records don't need payload all the time
    
    Fix for fdo#39517. Looking through the emf+ records, it looks like the
    assumption made that the minimum valid record length is 12 + non-0
    length payload isnt' right, looks like that the minimum valid record
    length is just 12, i.e. no need for a payload.

diff --git a/svtools/source/filter/wmf/enhwmf.cxx b/svtools/source/filter/wmf/enhwmf.cxx
index 2b65495..d4f5cab 100644
--- a/svtools/source/filter/wmf/enhwmf.cxx
+++ b/svtools/source/filter/wmf/enhwmf.cxx
@@ -275,7 +275,7 @@ void EnhWMFReader::ReadEMFPlusComment(sal_uInt32 length, sal_Bool& bHaveDC)
     sal_uInt32 nRemainder = length >= 4 ? length-4 : length;
 
     const size_t nRequiredHeaderSize = 12;
-    while (nRemainder > nRequiredHeaderSize)
+    while (nRemainder >= nRequiredHeaderSize)
     {
         sal_uInt16 type(0), flags(0);
         sal_uInt32 size(0), dataSize(0);


More information about the Libreoffice-commits mailing list