Skip to content

Commit

Permalink
min legal size here is > 4
Browse files Browse the repository at this point in the history
Change-Id: I9f68d000b32623db4d949d13284043630f5689f4
  • Loading branch information
Caolán McNamara committed Jul 13, 2015
1 parent a6fed7a commit 3131205
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vcl/source/gdi/jobset.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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());
Expand Down

0 comments on commit 3131205

Please sign in to comment.