Bug reported by Dominique Lorre Fix submitted by Jeroen Bakker When importing COLLADA files, the name of a custom data layer can be longer than 32 bytes. Make sure only 32 bytes are copied.
This commit is contained in:
parent
b8e47fd160
commit
fad7121ca3
|
@ -1444,9 +1444,8 @@ static CustomDataLayer *customData_add_layer__internal(CustomData *data,
|
|||
data->layers[index].type = type;
|
||||
data->layers[index].flag = flag;
|
||||
data->layers[index].data = newlayerdata;
|
||||
|
||||
if(name || (name=typeInfo->defaultname)) {
|
||||
strcpy(data->layers[index].name, name);
|
||||
BLI_strncpy(data->layers[index].name, name, 32);
|
||||
CustomData_set_layer_unique_name(data, index);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue