Kaydet (Commit) 25ff287d authored tarafından Christian Heimes's avatar Christian Heimes

Issue #20515: Fix NULL pointer dereference introduced by issue #20368

CID 1167595
...@@ -24,6 +24,8 @@ Core and Builtins ...@@ -24,6 +24,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 #20053: ensurepip (and hence venv) are no longer affected by the - Issue #20053: ensurepip (and hence venv) are no longer affected by the
......
...@@ -1397,6 +1397,9 @@ varname_converter(PyObject *in, void *_out) ...@@ -1397,6 +1397,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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment