diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-02-16 18:52:17 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-02-16 18:52:17 (GMT) |
commit | 26861b0b29fdf64fba8cd120183408495f2c80e2 (patch) | |
tree | 68aa9e4560327db352dcbda56bf3ea0325bde0f7 /Python/codecs.c | |
parent | 4d0d9829851915e97ae392dd803976be6c95c8d1 (diff) | |
download | cpython-26861b0b29fdf64fba8cd120183408495f2c80e2.zip cpython-26861b0b29fdf64fba8cd120183408495f2c80e2.tar.gz cpython-26861b0b29fdf64fba8cd120183408495f2c80e2.tar.bz2 |
Issue #23450: Fixed possible integer overflows.
Diffstat (limited to 'Python/codecs.c')
-rw-r--r-- | Python/codecs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/codecs.c b/Python/codecs.c index a558859..64fc3d6 100644 --- a/Python/codecs.c +++ b/Python/codecs.c @@ -1006,7 +1006,7 @@ PyObject *PyCodec_NameReplaceErrors(PyObject *exc) c = PyUnicode_READ_CHAR(object, i); if (ucnhash_CAPI && ucnhash_CAPI->getname(NULL, c, buffer, sizeof(buffer), 1)) { - replsize = 1+1+1+strlen(buffer)+1; + replsize = 1+1+1+(int)strlen(buffer)+1; } else if (c >= 0x10000) { replsize = 1+1+8; |