2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 00:52:16 +00:00

Fixed null ptr dereference in executable_path on solaris when getexecname fails.

This commit is contained in:
kjedruczyk
2014-10-10 11:36:05 +01:00
committed by Vladimir Prus
parent f929602088
commit c79ea493ff

View File

@@ -627,7 +627,8 @@ char *executable_path( char const * argv0 )
# include <stdlib.h>
char * executable_path( char const * argv0 )
{
return strdup( getexecname() );
const char * execname = getexecname();
return execname ? strdup( execname ) : NULL;
}
#elif defined(__FreeBSD__)
# include <sys/sysctl.h>