From 6c9263d817b7b4dcd4d6e1f365d1db0a83de6e51 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 9 Dec 2020 17:16:43 +1100 Subject: Fix off by one error in id-property name validation The Python API accepted a name with 64 bytes, clipping it to 63. --- source/blender/python/generic/idprop_py_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source') 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; -- cgit v1.2.3