summaryrefslogtreecommitdiffstats
path: root/svtools
diff options
context:
space:
mode:
authorRadek Doulik <rodo@novell.com>2012-03-07 16:52:22 +0100
committerRadek Doulik <rodo@novell.com>2012-03-07 16:59:53 +0100
commitd86d122a986292d76fe0a57c6285667356ee5170 (patch)
tree4bc6f5f0c1415cd27880c4181b2537de88904090 /svtools
parentfix make dependencies for windows (diff)
downloadcore-d86d122a986292d76fe0a57c6285667356ee5170.tar.gz
core-d86d122a986292d76fe0a57c6285667356ee5170.zip
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.cxx8
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)