diff options
author | mfe <mfe@openoffice.org> | 2000-12-18 09:21:07 +0000 |
---|---|---|
committer | mfe <mfe@openoffice.org> | 2000-12-18 09:21:07 +0000 |
commit | 6b0c5018432213ab106619245e1051c51f21de01 (patch) | |
tree | bc3b990c55e3a61f8afd5e65c0b55f7c9249c0ee | |
parent | 714a0aafb650136b14179edb1b4f1e70822f1b2b (diff) |
#82259# : malloc rigth size for pointer arrays
-rw-r--r-- | sal/osl/unx/process.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sal/osl/unx/process.c b/sal/osl/unx/process.c index 46682c3c2dc8..eb72af9022c0 100644 --- a/sal/osl/unx/process.c +++ b/sal/osl/unx/process.c @@ -2,9 +2,9 @@ * * $RCSfile: process.c,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: svesik $ $Date: 2000-11-06 14:07:14 $ + * last change: $Author: mfe $ $Date: 2000-12-18 10:21:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1524,7 +1524,7 @@ oslProcessError SAL_CALL osl_executeProcess(rtl_uString *ustrImageName, if ( pArguments == 0 && nArguments > 0 ) { - pArguments = (sal_Char**) malloc(nArguments+2 * sizeof(sal_Char*)); + pArguments = (sal_Char**) malloc( ( nArguments + 2 ) * sizeof(sal_Char*) ); } @@ -1550,7 +1550,7 @@ oslProcessError SAL_CALL osl_executeProcess(rtl_uString *ustrImageName, if ( pEnvironment == 0 ) { - pEnvironment = (sal_Char**) malloc(nEnvironmentVars+2 * sizeof(sal_Char*)); + pEnvironment = (sal_Char**) malloc( ( nEnvironmentVars + 2 ) * sizeof(sal_Char*) ); } rtl_uString2String( &strEnv, |