summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2016-09-08 22:08:35 (GMT)
committerChristian Heimes <christian@python.org>2016-09-08 22:08:35 (GMT)
commit275270772e6b733beb5bf0e24f6d33663975cc63 (patch)
tree311c3795b684468fa2e21547b68a0fdf1ff2d13d /Modules
parent301edfa579036baf35c1aa4ab5ea50bcd51c0fe0 (diff)
downloadcpython-275270772e6b733beb5bf0e24f6d33663975cc63.zip
cpython-275270772e6b733beb5bf0e24f6d33663975cc63.tar.gz
cpython-275270772e6b733beb5bf0e24f6d33663975cc63.tar.bz2
Check return value of PyList_Append() in Py_Main(). CID 1353200
Diffstat (limited to 'Modules')
-rw-r--r--Modules/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/main.c b/Modules/main.c
index b6dcdd0..0b82f48 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -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;