We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5c22049 + 68125ab commit 070002fCopy full SHA for 070002f
src/spt_setup.c
@@ -139,6 +139,13 @@ find_argv_from_env(int argc, char *arg0)
139
}
140
buf[argc] = NULL;
141
142
+ /* environ can be NULL if clearenv() has been called.
143
+ * Python 3.15 implements os.environ.clear() as clearenv(). */
144
+ if (!environ) {
145
+ spt_debug("environ pointer is NULL");
146
+ goto exit;
147
+ }
148
+
149
/* Walk back from environ until you find argc-1 null-terminated strings.
150
* Don't look for argv[0] as it's probably not preceded by 0. */
151
ptr = environ[0];
0 commit comments