bugfix [#22098] Binreloc buffer overrun

from Dan Eicher (dna)

there are many of these in blender however this case could happen quite easily.
This commit is contained in:
2010-04-21 07:59:16 +00:00
parent 9c69a8028b
commit 0430572dee

View File

@@ -1312,7 +1312,7 @@ void BLI_where_am_i(char *fullname, const char *name)
/* linux uses binreloc since argv[0] is not relyable, call br_init( NULL ) first */
path = br_find_exe( NULL );
if (path) {
strcpy(fullname, path);
BLI_strncpy(fullname, path, sizeof(fullname));
free(path);
return;
}