diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-07-13 09:45:55 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-07-13 22:42:20 +0200 |
commit | 902e90c99b78e423fc18d91053f9f3039202b0e0 (patch) | |
tree | fde61af8bafd935ea462f8a6bae6f667875abd0b | |
parent | f13ce9af5d0b275c43fad1753b0acf4ff39ab041 (diff) |
emf: fix another hang
Change-Id: I971ba5f422827f3b8fcdb86c447fc48415225eca
(cherry picked from commit fe20502c86ef6156a54bb37ba2560c8b64d129a4)
Reviewed-on: https://gerrit.libreoffice.org/16979
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
(cherry picked from commit 776618f628ea6302374c90722c3dbd0a6dac1c19)
-rw-r--r-- | vcl/qa/cppunit/graphicfilter/data/emf/fail/hang-2.emf | bin | 0 -> 7057 bytes | |||
-rw-r--r-- | vcl/source/filter/wmf/enhwmf.cxx | 4 |
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 Binary files differnew file mode 100644 index 000000000000..e3baf3bfa7da --- /dev/null +++ b/vcl/qa/cppunit/graphicfilter/data/emf/fail/hang-2.emf diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx index 12a9e4422af2..a9b69389e825 100644 --- a/vcl/source/filter/wmf/enhwmf.cxx +++ b/vcl/source/filter/wmf/enhwmf.cxx @@ -1570,9 +1570,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; } |