summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Misc/NEWS2
-rw-r--r--Modules/main.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 4082507..ceab279 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,8 @@ What's New in Python 3.3.0 Release Candidate 1?
Core and Builtins
-----------------
+- Issue #15761: Fix crash when PYTHONEXECUTABLE is set on Mac OS X.
+
- Issue #15726: Fix incorrect bounds checking in PyState_FindModule.
Patch by Robin Schreiber.
diff --git a/Modules/main.c b/Modules/main.c
index e86aa77..a16ce65 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -604,7 +604,7 @@ Py_Main(int argc, wchar_t **argv)
script. */
if ((p = Py_GETENV("PYTHONEXECUTABLE")) && *p != '\0') {
wchar_t* buffer;
- size_t len = strlen(p);
+ size_t len = strlen(p) + 1;
buffer = malloc(len * sizeof(wchar_t));
if (buffer == NULL) {