From a21350976e5436f49074141794fe8614931c268c Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 13 Oct 2010 22:36:16 +0000 Subject: main(): catch PyUnicode_FromString() failure (exit) --- Modules/python.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Modules/python.c b/Modules/python.c index 540bcfe..488aa79 100644 --- a/Modules/python.c +++ b/Modules/python.c @@ -44,6 +44,8 @@ main(int argc, char **argv) #ifdef __APPLE__ /* Use utf-8 on Mac OS X */ PyObject *unicode = PyUnicode_FromString(argv[i]); + if (!unicode) + return 1; argv_copy[i] = PyUnicode_AsWideCharString(unicode, NULL); Py_DECREF(unicode); #else -- cgit v0.12