mirror of
https://github.com/python/cpython.git
synced 2025-08-22 01:35:16 +00:00
Issue #23450: Fixed possible integer overflows.
This commit is contained in:
parent
4d0d982985
commit
26861b0b29
8 changed files with 64 additions and 50 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue