summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-07-13 11:02:56 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-07-13 11:03:14 +0100
commit3131205c05a3fde4ef1e3322cc48ca23c443f6d3 (patch)
tree012df7bd2e059447baf19343f1716f75e7226bdf
parenta6fed7a19befa5673403ec5fe3ab69a91475da3a (diff)
min legal size here is > 4
Change-Id: I9f68d000b32623db4d949d13284043630f5689f4
-rw-r--r--vcl/source/gdi/jobset.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index 17fb9c792f83..4d9b49949e99 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -222,7 +222,7 @@ SvStream& ReadJobSetup( SvStream& rIStream, JobSetup& rJobSetup )
{
sal_uInt16 nLen = 0;
rIStream.ReadUInt16( nLen );
- if ( !nLen )
+ if (nLen <= 4)
return rIStream;
sal_uInt16 nSystem = 0;
@@ -236,7 +236,7 @@ SvStream& ReadJobSetup( SvStream& rIStream, JobSetup& rJobSetup )
}
sal_Size nFirstPos = rIStream.Tell();
std::unique_ptr<char[]> pTempBuf(new char[nRead]);
- rIStream.Read(pTempBuf.get(), nRead);
+ rIStream.Read(pTempBuf.get(), nRead);
if (nRead >= sizeof(ImplOldJobSetupData))
{
ImplOldJobSetupData* pData = reinterpret_cast<ImplOldJobSetupData*>(pTempBuf.get());