Commit 4cc93db9 authored by Benjamin Peterson's avatar Benjamin Peterson

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

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