commit | 7ce201322edf76ad75038ad84229a070bec34be2 | [log] [tgz] |
---|---|---|
author | Christian Heimes <christian@python.org> | Wed Sep 14 10:25:46 2016 +0200 |
committer | Christian Heimes <christian@python.org> | Wed Sep 14 10:25:46 2016 +0200 |
tree | 9deac53cb02f8b82babbba544e0cd4c204062da2 | |
parent | 1f28a4749ba0dd85686b17bd649b0de0dd584b1a [diff] [blame] |
Restrict name_length to NAME_MAXLEN in unicodedata_UCD_lookup()
diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c index fe4e908..471d060 100644 --- a/Modules/unicodedata.c +++ b/Modules/unicodedata.c
@@ -1232,7 +1232,7 @@ { 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; }