Kaydet (Commit) 3131205c authored tarafından Caolán McNamara's avatar Caolán McNamara

min legal size here is > 4

Change-Id: I9f68d000b32623db4d949d13284043630f5689f4
üst a6fed7a1
...@@ -222,7 +222,7 @@ SvStream& ReadJobSetup( SvStream& rIStream, JobSetup& rJobSetup ) ...@@ -222,7 +222,7 @@ SvStream& ReadJobSetup( SvStream& rIStream, JobSetup& rJobSetup )
{ {
sal_uInt16 nLen = 0; sal_uInt16 nLen = 0;
rIStream.ReadUInt16( nLen ); rIStream.ReadUInt16( nLen );
if ( !nLen ) if (nLen <= 4)
return rIStream; return rIStream;
sal_uInt16 nSystem = 0; sal_uInt16 nSystem = 0;
...@@ -236,7 +236,7 @@ SvStream& ReadJobSetup( SvStream& rIStream, JobSetup& rJobSetup ) ...@@ -236,7 +236,7 @@ SvStream& ReadJobSetup( SvStream& rIStream, JobSetup& rJobSetup )
} }
sal_Size nFirstPos = rIStream.Tell(); sal_Size nFirstPos = rIStream.Tell();
std::unique_ptr<char[]> pTempBuf(new char[nRead]); std::unique_ptr<char[]> pTempBuf(new char[nRead]);
rIStream.Read(pTempBuf.get(), nRead); rIStream.Read(pTempBuf.get(), nRead);
if (nRead >= sizeof(ImplOldJobSetupData)) if (nRead >= sizeof(ImplOldJobSetupData))
{ {
ImplOldJobSetupData* pData = reinterpret_cast<ImplOldJobSetupData*>(pTempBuf.get()); ImplOldJobSetupData* pData = reinterpret_cast<ImplOldJobSetupData*>(pTempBuf.get());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment