Commit 5e043c32 authored by Benjamin Peterson's avatar Benjamin Peterson

avoid reading unallocated memory when argc == 0 (closes #22633)

parent 712ec4a3
...@@ -35,6 +35,7 @@ Py_FrozenMain(int argc, char **argv) ...@@ -35,6 +35,7 @@ Py_FrozenMain(int argc, char **argv)
#ifdef MS_WINDOWS #ifdef MS_WINDOWS
PyInitFrozenExtensions(); PyInitFrozenExtensions();
#endif /* MS_WINDOWS */ #endif /* MS_WINDOWS */
if (argc >= 1)
Py_SetProgramName(argv[0]); Py_SetProgramName(argv[0]);
Py_Initialize(); Py_Initialize();
#ifdef MS_WINDOWS #ifdef MS_WINDOWS
......
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