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();