diff options
author | Chris Halls <haggai@openoffice.org> | 2003-03-25 16:01:56 +0000 |
---|---|---|
committer | Chris Halls <haggai@openoffice.org> | 2003-03-25 16:01:56 +0000 |
commit | c082fe0562e8f972efa156081daff5030b3f3c79 (patch) | |
tree | ee160db374188a4d1f49c261e6b8e16e01d0ea7f /sal/osl/unx/process.c | |
parent | 3c491bef14277629f31594f0ab744c2335c36226 (diff) |
#i12645#: unhandled NULL return from getCmdLine() causes crashes in build tools
if no /proc mounted. Approved by mh
Diffstat (limited to 'sal/osl/unx/process.c')
-rw-r--r-- | sal/osl/unx/process.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sal/osl/unx/process.c b/sal/osl/unx/process.c index b3b46ee71223..ffa7947a8ca9 100644 --- a/sal/osl/unx/process.c +++ b/sal/osl/unx/process.c @@ -2,9 +2,9 @@ * * $RCSfile: process.c,v $ * - * $Revision: 1.27 $ + * $Revision: 1.28 $ * - * last change: $Author: tra $ $Date: 2002-12-14 12:57:16 $ + * last change: $Author: haggai $ $Date: 2003-03-25 17:01:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -466,6 +466,10 @@ oslProcessError SAL_CALL osl_psz_getExecutableFile(sal_Char* pszBuffer, sal_uInt char szAbsolutePath[PATH_MAX] = ""; char szRealPathBuf[PATH_MAX] = ""; + if( pszCmdLine == NULL ) { + return osl_Process_E_None; + } + /* if the command line argument #0 starts with a '/', this program has been */ /* invoked using a full qualified path */ if( '/' != pszCmdLine[0] ) |