aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2016-09-14 10:25:46 +0200
committerChristian Heimes <christian@python.org>2016-09-14 10:25:46 +0200
commit7ce201322edf76ad75038ad84229a070bec34be2 (patch)
tree9deac53cb02f8b82babbba544e0cd4c204062da2 /Modules/unicodedata.c
parentmerge heads (diff)
downloadcpython-7ce201322edf76ad75038ad84229a070bec34be2.tar.gz
cpython-7ce201322edf76ad75038ad84229a070bec34be2.tar.bz2
cpython-7ce201322edf76ad75038ad84229a070bec34be2.zip
Restrict name_length to NAME_MAXLEN in unicodedata_UCD_lookup()
Diffstat (limited to 'Modules/unicodedata.c')
-rw-r--r--Modules/unicodedata.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c
index fe4e90822a3..471d060c4a8 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;
}