From d1ab6089ff2b4f1277676a5feac11d311b2c52ab Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 1 Jun 2012 11:18:22 -0700 Subject: check return for error --- Python/ceval.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Python/ceval.c b/Python/ceval.c index 718bb32..b3ec013 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -3107,6 +3107,8 @@ format_missing(const char *kind, PyCodeObject *co, PyObject *names) tail = PyUnicode_FromFormat(", %U, and %U", PyList_GET_ITEM(names, len - 2), PyList_GET_ITEM(names, len - 1)); + if (tail == NULL) + return; /* Chop off the last two objects in the list. This shouldn't actually fail, but we can't be too careful. */ err = PyList_SetSlice(names, len - 2, len, NULL); -- cgit v0.12