[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/win

Armin Le Grand alg at apache.org
Mon Oct 21 05:08:05 PDT 2013


 vcl/win/source/gdi/salbmp.cxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit dd1cb9aa9ea24b6c89de05e6c5deae7951b78feb
Author: Armin Le Grand <alg at apache.org>
Date:   Mon Oct 21 10:33:16 2013 +0000

    i123478 Secure mem freeing for BitmapBuffer class

diff --git a/vcl/win/source/gdi/salbmp.cxx b/vcl/win/source/gdi/salbmp.cxx
index 8040ab4..005f822 100644
--- a/vcl/win/source/gdi/salbmp.cxx
+++ b/vcl/win/source/gdi/salbmp.cxx
@@ -333,6 +333,9 @@ Gdiplus::Bitmap* WinSalBitmap::ImplCreateGdiPlusBitmap()
 
     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::ImplCreateGdiPlusBitmap(const WinSalBitmap& rAlph
 
     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::ImplCreateGdiPlusBitmap(const WinSalBitmap& rAlph
 
     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


More information about the Libreoffice-commits mailing list