commit | 6c83e739d7b1690f8763b2437266effa71173324 | [log] [tgz] |
---|---|---|
author | Serhiy Storchaka <storchaka@gmail.com> | Fri Jan 04 12:39:34 2013 +0200 |
committer | Serhiy Storchaka <storchaka@gmail.com> | Fri Jan 04 12:39:34 2013 +0200 |
tree | 12acc97efcdcc623e2a3fd8db90b4eb78cccb7bb | |
parent | bf064b391102b0cf1a79c08c64855a036c957650 [diff] [blame] |
Issue #16856: Fix a segmentation fault from calling repr() on a dict with a key whose repr raise an exception.
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 @@ 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;