Fix off by one error in id-property name validation
The Python API accepted a name with 64 bytes, clipping it to 63.
This commit is contained in:
parent
3b5a81936d
commit
6c9263d817
Notes:
blender-bot
2023-02-14 03:21:27 +01:00
Referenced by commit ebe4bf6286
, Fix another id-property name length check
|
@ -365,7 +365,7 @@ static const char *idp_try_read_name(PyObject *name_obj)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (name_size > MAX_IDPROP_NAME) {
|
||||
if (name_size >= MAX_IDPROP_NAME) {
|
||||
PyErr_SetString(PyExc_KeyError,
|
||||
"the length of IDProperty names is limited to 63 characters");
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue