diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-04 10:39:34 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-04 10:39:34 (GMT) |
commit | 6c83e739d7b1690f8763b2437266effa71173324 (patch) | |
tree | 12acc97efcdcc623e2a3fd8db90b4eb78cccb7bb /Objects/unicodeobject.c | |
parent | bf064b391102b0cf1a79c08c64855a036c957650 (diff) | |
download | cpython-6c83e739d7b1690f8763b2437266effa71173324.zip cpython-6c83e739d7b1690f8763b2437266effa71173324.tar.gz cpython-6c83e739d7b1690f8763b2437266effa71173324.tar.bz2 |
Issue #16856: Fix a segmentation fault from calling repr() on a dict with
a key whose repr raise an exception.
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r-- | Objects/unicodeobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 3b307ed..1522a16 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -10672,7 +10672,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; |