constraints unique name length was set too long (could overrun the buffer), use sizeof() with other instances of BLI_uniquename too

This commit is contained in:
2010-02-18 10:14:49 +00:00
parent cff0110d08
commit 42fd22531f
12 changed files with 19 additions and 19 deletions

View File

@@ -1199,7 +1199,7 @@ DriverVar *driver_add_new_variable (ChannelDriver *driver)
/* give the variable a 'unique' name */
strcpy(dvar->name, "var");
BLI_uniquename(&driver->variables, dvar, "var", '_', offsetof(DriverVar, name), 64);
BLI_uniquename(&driver->variables, dvar, "var", '_', offsetof(DriverVar, name), sizeof(dvar->name));
/* set the default type to 'single prop' */
driver_change_variable_type(dvar, DVAR_TYPE_SINGLE_PROP);