summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-08-31 15:06:27 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-09-02 15:48:10 +0000
commit58beafe8301349bfb4f7c83d2583cd4b37463480 (patch)
tree82a5673b49ce55c7b5ba49a2fec057dd355df74d /vcl
parenta9ef149b5683ed21a9debbaa8d14f74ba78230ed (diff)
check stream status
Change-Id: I27bb289288d319a93201e9c3d703114924ca258c (cherry picked from commit daf1578d752531e2b48d183531d9a4a7cedfc37e) Reviewed-on: https://gerrit.libreoffice.org/18178 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/qa/cppunit/graphicfilter/data/wmf/fail/hang-4.wmfbin0 -> 244 bytes
-rw-r--r--vcl/source/filter/wmf/winwmf.cxx2
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
new file mode 100644
index 000000000000..f16b60ca7f82
--- /dev/null
+++ b/vcl/qa/cppunit/graphicfilter/data/wmf/fail/hang-4.wmf
Binary files differ
diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx
index 4667844ff6c3..0a5fd12d7e36 100644
--- a/vcl/source/filter/wmf/winwmf.cxx
+++ b/vcl/source/filter/wmf/winwmf.cxx
@@ -627,7 +627,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++ )