[Python-checkins] cpython (merge 3.6 -> default): 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/55fa8e38a5f0
changeset: 103795:55fa8e38a5f0
parent: 103792:f8c11b61cfb7
parent: 103794:eb503ae0ab57
user: Christian Heimes <christian at python.org>
date: Wed Sep 14 10:26:20 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