[Libreoffice-commits] core.git: vcl/source

Caolán McNamara caolanm at redhat.com
Mon Jul 13 03:03:41 PDT 2015


 vcl/source/gdi/jobset.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3131205c05a3fde4ef1e3322cc48ca23c443f6d3
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jul 13 11:02:56 2015 +0100

    min legal size here is > 4
    
    Change-Id: I9f68d000b32623db4d949d13284043630f5689f4

diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index 17fb9c7..4d9b499 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());


More information about the Libreoffice-commits mailing list