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

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

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