diff options
author | Christian Heimes <christian@python.org> | 2016-09-08 22:08:35 (GMT) |
---|---|---|
committer | Christian Heimes <christian@python.org> | 2016-09-08 22:08:35 (GMT) |
commit | 275270772e6b733beb5bf0e24f6d33663975cc63 (patch) | |
tree | 311c3795b684468fa2e21547b68a0fdf1ff2d13d /Modules | |
parent | 301edfa579036baf35c1aa4ab5ea50bcd51c0fe0 (diff) | |
download | cpython-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.c | 3 |
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; |