diff options
author | Christian Heimes <christian@python.org> | 2016-09-14 08:25:54 (GMT) |
---|---|---|
committer | Christian Heimes <christian@python.org> | 2016-09-14 08:25:54 (GMT) |
commit | 8cee10386e0a3f58283c968ba968dd792e3393a0 (patch) | |
tree | 9c9d70b2fd18c25be756f7f5e2e3e414ac819261 /Modules/unicodedata.c | |
parent | 37098cd5848558f092ae26978369590b993132c3 (diff) | |
parent | 7ce201322edf76ad75038ad84229a070bec34be2 (diff) | |
download | cpython-8cee10386e0a3f58283c968ba968dd792e3393a0.zip cpython-8cee10386e0a3f58283c968ba968dd792e3393a0.tar.gz cpython-8cee10386e0a3f58283c968ba968dd792e3393a0.tar.bz2 |
Restrict name_length to NAME_MAXLEN in unicodedata_UCD_lookup()
Diffstat (limited to 'Modules/unicodedata.c')
-rw-r--r-- | Modules/unicodedata.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c index 7d518fa..b07d941 100644 --- a/Modules/unicodedata.c +++ b/Modules/unicodedata.c @@ -1232,7 +1232,7 @@ unicodedata_UCD_lookup_impl(PyObject *self, const char *name, { Py_UCS4 code; unsigned int index; - if (name_length > INT_MAX) { + if (name_length > NAME_MAXLEN) { PyErr_SetString(PyExc_KeyError, "name too long"); return NULL; } |