Commit 27527077 authored by Christian Heimes's avatar Christian Heimes

Check return value of PyList_Append() in Py_Main(). CID 1353200

parent 301edfa5
......@@ -482,7 +482,8 @@ Py_Main(int argc, wchar_t **argv)
warning_option = PyUnicode_FromWideChar(_PyOS_optarg, -1);
if (warning_option == NULL)
Py_FatalError("failure in handling of -W argument");
PyList_Append(warning_options, warning_option);
if (PyList_Append(warning_options, warning_option) == -1)
Py_FatalError("failure in handling of -W argument");
Py_DECREF(warning_option);
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment