mirror of
https://github.com/python/cpython.git
synced 2025-10-02 05:12:23 +00:00
Restrict name_length to NAME_MAXLEN in unicodedata_UCD_lookup()
This commit is contained in:
commit
1ed8e3fac9
1 changed files with 1 additions and 1 deletions
|
@ -1232,7 +1232,7 @@ unicodedata_UCD_lookup_impl(PyObject *self, const char *name,
|
||||||
{
|
{
|
||||||
Py_UCS4 code;
|
Py_UCS4 code;
|
||||||
unsigned int index;
|
unsigned int index;
|
||||||
if (name_length > INT_MAX) {
|
if (name_length > NAME_MAXLEN) {
|
||||||
PyErr_SetString(PyExc_KeyError, "name too long");
|
PyErr_SetString(PyExc_KeyError, "name too long");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue