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

Michael Stahl mstahl at redhat.com
Tue Aug 29 15:20:40 UTC 2017


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

New commits:
commit a0122363e4da9e147f7eb1e40ed9ab692aa4823d
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Aug 24 17:14:45 2017 +0200

    vcl: fix double-free of ErrorInfo
    
    The only value that ErrorHandler::GetErrorString() adds over
    ErrorStringFactory::CreateString() is that it will delete the pInfo a
    2nd time, because the ErrorInfo::GetErrorInfo() returns the same object
    twice.
    
    This may fix it, but it's generally hard to tell what this
    brain damaged error handling code will do.
    
    (regression from 1167df7df59e37fddef0c40c4d27cb2e82e10922)
    
    Change-Id: I22f446bee669cae8c5288bcc2f1e1d0299f5b384
    (cherry picked from commit 41fb6822cbc2f82333ea54db816f60616f827e49)
    Reviewed-on: https://gerrit.libreoffice.org/41537
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/vcl/source/window/errinf.cxx b/vcl/source/window/errinf.cxx
index 06b004b6e2fd..32948d77bf1c 100644
--- a/vcl/source/window/errinf.cxx
+++ b/vcl/source/window/errinf.cxx
@@ -152,7 +152,7 @@ DialogMask ErrorHandler::HandleError(sal_uInt32 nErrCodeId, DialogMask nFlags)
     }
 
     OUString aErr;
-    if (ErrorHandler::GetErrorString(nErrCodeId, aErr))
+    if (ErrorStringFactory::CreateString(pInfo, aErr))
     {
         if(!rData.pDsp)
         {


More information about the Libreoffice-commits mailing list