mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #16856: Fix a segmentation fault from calling repr() on a dict with
a key whose repr raise an exception.
This commit is contained in:
commit
4e02538bf3
2 changed files with 4 additions and 1 deletions
|
@ -10548,7 +10548,7 @@ PyUnicode_Append(PyObject **p_left, PyObject *right)
|
|||
return;
|
||||
}
|
||||
left = *p_left;
|
||||
if (right == NULL || !PyUnicode_Check(left)) {
|
||||
if (right == NULL || left == NULL || !PyUnicode_Check(left)) {
|
||||
if (!PyErr_Occurred())
|
||||
PyErr_BadInternalCall();
|
||||
goto error;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue