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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri May 7 11:13:18 UTC 2021


 vcl/source/bitmap/BitmapMosaicFilter.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 5ed1e84ce2acbcc8700a49549b68fe7be19f94d0
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri May 7 09:58:28 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri May 7 13:12:34 2021 +0200

    cid#1482086 silence bogus Double free
    
    Change-Id: I7567ce468f94c9565d2d6fd88a051383dae41013
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115231
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/source/bitmap/BitmapMosaicFilter.cxx b/vcl/source/bitmap/BitmapMosaicFilter.cxx
index c13ab0199540..0426dc3ff044 100644
--- a/vcl/source/bitmap/BitmapMosaicFilter.cxx
+++ b/vcl/source/bitmap/BitmapMosaicFilter.cxx
@@ -156,8 +156,9 @@ BitmapEx BitmapMosaicFilter::execute(BitmapEx const& rBitmapEx) const
             bRet = true;
         }
 
+        if (pWriteAcc == pReadAcc)
+            pWriteAcc = nullptr;
         Bitmap::ReleaseAccess(pReadAcc);
-        pReadAcc = nullptr;
 
         if (pNewBmp)
         {


More information about the Libreoffice-commits mailing list