Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/1530

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/30/1530/1

The problem is that the process handle is freed regardless of whether osl_executeProcess was 
successful or not. Therefore, a segmentation fault would result, as a random memory address would 
be freed. This patch checks whether osl_executeProcess was successful. If it was, then it frees the 
handle; if it wasn't successful, the memory is not freed.

Change-Id: Ic3af07be06e7af7730a3bcb1680c659a88b66af3
---
M basic/source/runtime/methods.cxx
1 file changed, 5 insertions(+), 1 deletion(-)



diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 20fee90..1de512b 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -3534,7 +3534,11 @@
                     NULL, 0,
                     &pApp ) == osl_Process_E_None;
 
-        osl_freeProcessHandle( pApp );
+        // 53521 only free process handle on success
+        if (bSucc)
+        {
+            osl_freeProcessHandle( pApp );
+        }
 
         for(int j = 0; i < nParamCount; i++)
         {

-- 
To view, visit https://gerrit.libreoffice.org/1530
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic3af07be06e7af7730a3bcb1680c659a88b66af3
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Christopher Copits <ChrisCDev@live.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.