[Libreoffice-commits] core.git: emfio/source
Caolán McNamara
caolanm at redhat.com
Mon Nov 13 20:26:46 UTC 2017
emfio/source/reader/wmfreader.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 1243f89c6b90f95527104d38ed4e015a69abd1bd
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Nov 13 17:00:55 2017 +0000
ofz: detect short read
Change-Id: I1d394e914c4791a2bc3a8f3dbb1cf200e7d528fe
Reviewed-on: https://gerrit.libreoffice.org/44691
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx
index 1d0ee83709fc..b27b49e307f7 100644
--- a/emfio/source/reader/wmfreader.cxx
+++ b/emfio/source/reader/wmfreader.cxx
@@ -514,7 +514,7 @@ namespace emfio
if ( nLength )
{
std::unique_ptr<char[]> pChar(new char[ ( nLength + 1 ) &~ 1 ]);
- mpInputStream->ReadBytes(pChar.get(), (nLength + 1) &~ 1);
+ nLength = std::min<sal_uInt64>(nLength, mpInputStream->ReadBytes(pChar.get(), (nLength + 1) &~ 1));
OUString aText( pChar.get(), nLength, GetCharSet() );
pChar.reset();
Point aPosition( ReadYX() );
More information about the Libreoffice-commits
mailing list