[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source

Mark Wielaard mark at klomp.org
Thu Jun 6 02:15:33 PDT 2013


 vcl/source/filter/jpeg/Exif.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 9bf4fb7094567ae64107faced69c25000a101cde
Author: Mark Wielaard <mark at klomp.org>
Date:   Thu Jun 6 09:36:09 2013 +0200

    Fix memory leak in Exif::processExif. Delete aExifData when done.
    
    Change-Id: I1e63727fb8d587401c72775a14e7e3572b04fff5
    Reviewed-on: https://gerrit.libreoffice.org/4171
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 9645818f6817652568fe14c83c2dc46a9e5c3489)

diff --git a/vcl/source/filter/jpeg/Exif.cxx b/vcl/source/filter/jpeg/Exif.cxx
index 167cf54..f44b54f 100644
--- a/vcl/source/filter/jpeg/Exif.cxx
+++ b/vcl/source/filter/jpeg/Exif.cxx
@@ -213,6 +213,7 @@ bool Exif::processExif(SvStream& rStream, sal_uInt16 aSectionLength, bool bSetVa
 
     if( 0x4949 != aTiffHeader->byteOrder || 0x002A != aTiffHeader->tagAlign )
     {
+        delete[] aExifData;
         return false;
     }
 
@@ -231,6 +232,7 @@ bool Exif::processExif(SvStream& rStream, sal_uInt16 aSectionLength, bool bSetVa
         rStream.Write(aExifData, aLength);
     }
 
+    delete[] aExifData;
     return true;
 }
 


More information about the Libreoffice-commits mailing list