diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-08-31 15:06:27 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-09-01 15:25:45 +0000 |
commit | 03d15f2728be8d0e0e226dacdaf0bee8340b0ecd (patch) | |
tree | f5de73ec62491e147a79517009c86ce0b0b45104 | |
parent | 2575e441d860abd0b49e4593135736e20febb48e (diff) |
check stream status
Change-Id: I27bb289288d319a93201e9c3d703114924ca258c
(cherry picked from commit daf1578d752531e2b48d183531d9a4a7cedfc37e)
Reviewed-on: https://gerrit.libreoffice.org/18177
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
-rw-r--r-- | vcl/qa/cppunit/graphicfilter/data/wmf/fail/hang-4.wmf | bin | 0 -> 244 bytes | |||
-rw-r--r-- | vcl/source/filter/wmf/winwmf.cxx | 2 |
2 files changed, 1 insertions, 1 deletions
diff --git a/vcl/qa/cppunit/graphicfilter/data/wmf/fail/hang-4.wmf b/vcl/qa/cppunit/graphicfilter/data/wmf/fail/hang-4.wmf Binary files differnew file mode 100644 index 000000000000..f16b60ca7f82 --- /dev/null +++ b/vcl/qa/cppunit/graphicfilter/data/wmf/fail/hang-4.wmf diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx index 7c153c70fe9b..1f4cd7d383ed 100644 --- a/vcl/source/filter/wmf/winwmf.cxx +++ b/vcl/source/filter/wmf/winwmf.cxx @@ -650,7 +650,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) pAcc = aBmp.AcquireWriteAccess(); if ( pAcc ) { - for (sal_uInt16 y = 0; y < nHeight; y++ ) + for (sal_uInt16 y = 0; y < nHeight && pWMF->good(); ++y) { sal_uInt16 x = 0; for (sal_uInt16 scan = 0; scan < nBytesPerScan; scan++ ) |