Commit 7ce20132 authored by Christian Heimes's avatar Christian Heimes

Restrict name_length to NAME_MAXLEN in unicodedata_UCD_lookup()

parent 1f28a474
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment