mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
CID 1167595
This commit is contained in:
parent
6068b6c977
commit
d33491ea76
2 changed files with 5 additions and 0 deletions
|
@ -45,6 +45,8 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #20515: Fix NULL pointer dereference introduced by issue #20368.
|
||||||
|
|
||||||
- Issue #19186: Restore namespacing of expat symbols inside the pyexpat module.
|
- Issue #19186: Restore namespacing of expat symbols inside the pyexpat module.
|
||||||
|
|
||||||
- Issue #20426: When passing the re.DEBUG flag, re.compile() displays the
|
- Issue #20426: When passing the re.DEBUG flag, re.compile() displays the
|
||||||
|
|
|
@ -1568,6 +1568,9 @@ varname_converter(PyObject *in, void *_out)
|
||||||
if (PyUnicode_Check(in)) {
|
if (PyUnicode_Check(in)) {
|
||||||
Py_ssize_t size;
|
Py_ssize_t size;
|
||||||
s = PyUnicode_AsUTF8AndSize(in, &size);
|
s = PyUnicode_AsUTF8AndSize(in, &size);
|
||||||
|
if (s == NULL) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if (size > INT_MAX) {
|
if (size > INT_MAX) {
|
||||||
PyErr_SetString(PyExc_OverflowError, "string is too long");
|
PyErr_SetString(PyExc_OverflowError, "string is too long");
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue