[Libreoffice-commits] .: 2 commits - svtools/source

Radek Doulík rodo at kemper.freedesktop.org
Thu Mar 8 05:09:12 PST 2012


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

New commits:
commit c6e83ea051054c59abb685ad4258ac0b74e119c4
Author: Radek Doulik <rodo at novell.com>
Date:   Thu Mar 8 14:08:56 2012 +0100

    fix the condition

diff --git a/svtools/source/filter/wmf/winwmf.cxx b/svtools/source/filter/wmf/winwmf.cxx
index e52d08e..d9daf2a 100644
--- a/svtools/source/filter/wmf/winwmf.cxx
+++ b/svtools/source/filter/wmf/winwmf.cxx
@@ -1101,7 +1101,7 @@ sal_Bool WMFReader::ReadHeader()
     {
         sal_uInt16 aNextWord(0);
         *pWMF >> aNextWord;
-        if (nMetaKey == 0x10000 && aNextWord != 0x09)
+        if (nMetaKey != 0x10000 || aNextWord != 0x09)
         {
             pWMF->SetError( SVSTREAM_FILEFORMAT_ERROR );
             return false;
commit 47462311eeeac0c9e560e0bb77a3c2c623362b83
Author: Radek Doulik <rodo at novell.com>
Date:   Thu Mar 8 13:57:33 2012 +0100

    added one more check to be more safe to identify (in)valid metafiles

diff --git a/svtools/source/filter/wmf/winwmf.cxx b/svtools/source/filter/wmf/winwmf.cxx
index a9c2913..e52d08e 100644
--- a/svtools/source/filter/wmf/winwmf.cxx
+++ b/svtools/source/filter/wmf/winwmf.cxx
@@ -1101,7 +1101,7 @@ sal_Bool WMFReader::ReadHeader()
     {
         sal_uInt16 aNextWord(0);
         *pWMF >> aNextWord;
-        if (aNextWord != 0x09)
+        if (nMetaKey == 0x10000 && aNextWord != 0x09)
         {
             pWMF->SetError( SVSTREAM_FILEFORMAT_ERROR );
             return false;


More information about the Libreoffice-commits mailing list