diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-12-09 09:16:43 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-12-09 09:16:43 +0300 |
commit | 6c9263d817b7b4dcd4d6e1f365d1db0a83de6e51 (patch) | |
tree | 270fdcf59ae1222adcde34d1f4ec891fbd940f4d /source/blender/python/generic | |
parent | 3b5a81936d8955a2de3ab4d3732bc5a7f9baec8a (diff) |
Fix off by one error in id-property name validation
The Python API accepted a name with 64 bytes, clipping it to 63.
Diffstat (limited to 'source/blender/python/generic')
-rw-r--r-- | source/blender/python/generic/idprop_py_api.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c index 1a7a0ecc6d7..c125edea19f 100644 --- a/source/blender/python/generic/idprop_py_api.c +++ b/source/blender/python/generic/idprop_py_api.c @@ -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; |