From: Christian Heimes Date: Wed, 14 Sep 2016 08:25:46 +0000 (+0200) Subject: Restrict name_length to NAME_MAXLEN in unicodedata_UCD_lookup() X-Git-Tag: v3.6.0b2~216^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7ce201322edf76ad75038ad84229a070bec34be2;p=thirdparty%2FPython%2Fcpython.git Restrict name_length to NAME_MAXLEN in unicodedata_UCD_lookup() --- diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c index fe4e90822a30..471d060c4a8f 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; }