Merge pull request #97 from n4k/patch-1
Fix missing null byte : my_executable_directory
This commit is contained in:
@@ -242,6 +242,7 @@ static void set_my_executable_path(void)
|
|||||||
my_executable_path[path_length] = '\0';
|
my_executable_path[path_length] = '\0';
|
||||||
my_executable_directory = (char *)malloc(dirname_length + 2);
|
my_executable_directory = (char *)malloc(dirname_length + 2);
|
||||||
strncpy(my_executable_directory, my_executable_path, dirname_length+1);
|
strncpy(my_executable_directory, my_executable_path, dirname_length+1);
|
||||||
|
my_executable_directory[dirname_length+1] = '\0';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user