Fix security issue CVE-2015-3887

This commit is contained in:
intika 2019-01-22 13:25:35 +00:00 committed by GitHub
parent fbfdd995db
commit 9f99278525
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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