summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-07-13 09:45:55 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-07-14 11:14:25 +0000
commitae58f6fcb0cc9eb83781602aabbf0a35add26f42 (patch)
tree0435935211c2570bb6e61ff762954158ba8b218c
parentemf: fix hang (diff)
downloadcore-ae58f6fcb0cc9eb83781602aabbf0a35add26f42.tar.gz
core-ae58f6fcb0cc9eb83781602aabbf0a35add26f42.zip
emf: fix another hang
Change-Id: I971ba5f422827f3b8fcdb86c447fc48415225eca (cherry picked from commit fe20502c86ef6156a54bb37ba2560c8b64d129a4) Reviewed-on: https://gerrit.libreoffice.org/16998 Reviewed-by: David Tardon <dtardon@redhat.com> Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/qa/cppunit/graphicfilter/data/emf/fail/hang-2.emfbin0 -> 7057 bytes
-rw-r--r--vcl/source/filter/wmf/enhwmf.cxx4
2 files changed, 2 insertions, 2 deletions
diff --git a/vcl/qa/cppunit/graphicfilter/data/emf/fail/hang-2.emf b/vcl/qa/cppunit/graphicfilter/data/emf/fail/hang-2.emf
new file mode 100644
index 000000000000..e3baf3bfa7da
--- /dev/null
+++ b/vcl/qa/cppunit/graphicfilter/data/emf/fail/hang-2.emf
Binary files differ
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 741ec15d7a9f..dcd802c6c46d 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -1728,9 +1728,9 @@ bool EnhWMFReader::ReadHeader()
pWMF->ReadInt32(nRecordCount);
- if (nRecordCount == 0)
+ if (nRecordCount <= 0)
{
- SAL_WARN("vcl.emf", "EMF\t\tEMF Header object shows record counter as 0! This shouldn't "
+ SAL_WARN("vcl.emf", "EMF\t\tEMF Header object shows record counter as <= 0! This shouldn't "
"be possible... indicator of possible file corruption?");
return false;
}