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:
committed by
Vladimir Prus
parent
f929602088
commit
c79ea493ff
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user