[Python-checkins] cpython (merge 3.5 -> 3.6): Restrict name_length to NAME_MAXLEN in unicodedata_UCD_lookup()
christian.heimes
python-checkins at python.org
Wed Sep 14 04:28:11 EDT 2016
https://hg.python.org/cpython/rev/eb503ae0ab57
changeset: 103794:eb503ae0ab57
branch: 3.6
parent: 103790:0ea088671bc2
parent: 103793:299ff8bca194
user: Christian Heimes <christian at python.org>
date: Wed Sep 14 10:25:54 2016 +0200
summary:
Restrict name_length to NAME_MAXLEN in unicodedata_UCD_lookup()
files:
Modules/unicodedata.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c
--- 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;
}
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list