enforce string limits (reported by pedantic checking tools & some developers).
mostly replace strcpy with BLI_strncpy and multiple strcat's with a BLI_snprintf(). also fix possible crash if CWD isnt available.
This commit is contained in:
@@ -201,7 +201,7 @@ static int BPy_IDGroup_SetName(BPy_IDProperty *self, PyObject *value, void *UNUS
|
||||
return -1;
|
||||
}
|
||||
|
||||
strcpy(self->prop->name, st);
|
||||
BLI_strncpy(self->prop->name, st, sizeof(self->prop->name));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user