You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2013/10/21 12:33:17 UTC

svn commit: r1534084 - /openoffice/trunk/main/vcl/win/source/gdi/salbmp.cxx

Author: alg
Date: Mon Oct 21 10:33:16 2013
New Revision: 1534084

URL: http://svn.apache.org/r1534084
Log:
i123478 Secure mem freeing for BitmapBuffer class

Modified:
    openoffice/trunk/main/vcl/win/source/gdi/salbmp.cxx

Modified: openoffice/trunk/main/vcl/win/source/gdi/salbmp.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/win/source/gdi/salbmp.cxx?rev=1534084&r1=1534083&r2=1534084&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/win/source/gdi/salbmp.cxx (original)
+++ openoffice/trunk/main/vcl/win/source/gdi/salbmp.cxx Mon Oct 21 10:33:16 2013
@@ -333,6 +333,9 @@ Gdiplus::Bitmap* WinSalBitmap::ImplCreat
 
     if(pExtraRGB)
     {
+        // #123478# shockingly, BitmapBuffer does not free the memory it is controlling
+        // in it's destructor, this *has to be done handish*. Doing it here now
+        delete[] pExtraRGB->mpBits;
         delete pExtraRGB;
     }
     else
@@ -471,6 +474,9 @@ Gdiplus::Bitmap* WinSalBitmap::ImplCreat
 
     if(pExtraA)
     {
+        // #123478# shockingly, BitmapBuffer does not free the memory it is controlling
+        // in it's destructor, this *has to be done handish*. Doing it here now
+        delete[] pExtraA->mpBits;
         delete pExtraA;
     }
     else
@@ -485,6 +491,9 @@ Gdiplus::Bitmap* WinSalBitmap::ImplCreat
 
     if(pExtraRGB)
     {
+        // #123478# shockingly, BitmapBuffer does not free the memory it is controlling
+        // in it's destructor, this *has to be done handish*. Doing it here now
+        delete[] pExtraRGB->mpBits;
         delete pExtraRGB;
     }
     else