vcl/source/gdi/pdfwriter_impl.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b18519cc1373e82b61e6c75b585903ff491c49e9
Author: Julien Nabet <serval2...@yahoo.fr>
Date:   Sun Dec 30 22:04:55 2012 +0100

    Fix Memory leak: buffer
    
    Change-Id: I300b329de802aa88c71bdf9da0a878a1577364b7

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index e24bf26..b017daa7 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -6245,8 +6245,8 @@ bool PDFWriterImpl::finalizeSignature()
     HASH_Update(hc, reinterpret_cast<const unsigned char*>(buffer), bytesRead);
     delete[] buffer;
 
-    buffer = new char[nLastByteRangeNo + 1];
     CHECK_RETURN( (osl_File_E_None == osl_setFilePos( m_aFile, 
osl_Pos_Absolut, m_nSignatureContentOffset + MAX_SIGNATURE_CONTENT_LENGTH + 1) 
) );
+    buffer = new char[nLastByteRangeNo + 1];
     CHECK_RETURN( (osl_File_E_None == osl_readFile( m_aFile, buffer, 
nLastByteRangeNo, &bytesRead ) ) );
     if (bytesRead != (sal_uInt64) nLastByteRangeNo)
         SAL_WARN("vcl.gdi", "PDF Signing: Second buffer read failed!");
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to