commit | 4cc93db9b3793688acf08ad78913b5a0228b5923 | [log] [tgz] |
---|---|---|
author | Benjamin Peterson <benjamin@python.org> | Sat Feb 14 15:17:25 2015 -0500 |
committer | Benjamin Peterson <benjamin@python.org> | Sat Feb 14 15:17:25 2015 -0500 |
tree | bee37b7a509ee7a24dda6bf057c2aad95d026c44 | |
parent | 7fe04f1dca5820c43416145789f4cc2b94e918b8 [diff] |
avoid reading unallocated memory when argc == 0 (closes #22633)
diff --git a/Python/frozenmain.c b/Python/frozenmain.c index d31da07..e742172 100644 --- a/Python/frozenmain.c +++ b/Python/frozenmain.c
@@ -35,7 +35,8 @@ #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();