Fix stack corruptions in special cases
Issue was caused by wrong array length used for result of name_uiprefix_id, which shall actually be 1 byte bugger than MAX_ID_NAME. Reported by Sebastian Koenig in IRC.
This commit is contained in:
@@ -1357,6 +1357,7 @@ static void rna_search_cb(const struct bContext *C, void *arg_but, const char *s
|
||||
char name_ui[MAX_ID_NAME];
|
||||
|
||||
#if 0 /* this name is used for a string comparison and can't be modified, TODO */
|
||||
/* if ever enabled, make name_ui be MAX_ID_NAME+1 */
|
||||
name_uiprefix_id(name_ui, id);
|
||||
#else
|
||||
BLI_strncpy(name_ui, id->name + 2, sizeof(name_ui));
|
||||
|
Reference in New Issue
Block a user