diff options
author | Radek Doulik <rodo@novell.com> | 2012-03-07 16:52:22 +0100 |
---|---|---|
committer | Radek Doulik <rodo@novell.com> | 2012-03-07 16:59:53 +0100 |
commit | d86d122a986292d76fe0a57c6285667356ee5170 (patch) | |
tree | 4bc6f5f0c1415cd27880c4181b2537de88904090 /svtools | |
parent | 5b2b793caeed16e5d7d63cb5ce8a07289051dca8 (diff) |
allow wmf header to be placed on position aligned to 4 bytes
- because there are such buggy emf files flying around (n#705956)
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/filter/wmf/winwmf.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/svtools/source/filter/wmf/winwmf.cxx b/svtools/source/filter/wmf/winwmf.cxx index 43cf34bd10f9..13f8feef70f9 100644 --- a/svtools/source/filter/wmf/winwmf.cxx +++ b/svtools/source/filter/wmf/winwmf.cxx @@ -1099,8 +1099,12 @@ sal_Bool WMFReader::ReadHeader() return false; if (nMetaKey != 0x00090001) { - pWMF->SetError( SVSTREAM_FILEFORMAT_ERROR ); - return false; + sal_uInt16 aNextWord; + *pWMF >> aNextWord; + if (aNextWord != 0x09) { + pWMF->SetError( SVSTREAM_FILEFORMAT_ERROR ); + return false; + } } pWMF->SeekRel( 2 ); // Version (von Windows) |