Fix security issue CVE-2015-3887

This commit is contained in:
intika 2019-01-16 07:22:48 +00:00 committed by GitHub
parent fbfdd995db
commit 07b278b4fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,7 +37,6 @@ static const char *dll_name = DLL_NAME;
static char own_dir[256];
static const char *dll_dirs[] = {
".",
own_dir,
LIB_DIR,
"/lib",
@ -52,7 +51,7 @@ static void set_own_dir(const char *argv0) {
while(l && argv0[l - 1] != '/')
l--;
if(l == 0)
memcpy(own_dir, ".", 2);
memcpy(own_dir, "/dev/null/", 2);
else {
memcpy(own_dir, argv0, l - 1);
own_dir[l] = 0;