mirror of
https://github.com/python/cpython.git
synced 2024-11-27 11:55:13 +08:00
Restrict name_length to NAME_MAXLEN in unicodedata_UCD_lookup()
This commit is contained in:
parent
1f28a4749b
commit
7ce201322e
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user