From c6d3830a4f643113097ef173938e1ae3ad47ae30 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Mon, 6 Dec 2021 18:41:50 +0100 Subject: [PATCH] bpo-45582: framework build: modPath must not be const modPath was marked as static const although the char array is modified later in the function. Fixes a crash when building with --enable-framework. Issue was found by Ronald. Co-authored-by: Ronald Oussoren Signed-off-by: Christian Heimes --- Modules/getpath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/getpath.c b/Modules/getpath.c index 2e46226a085311..9ce7260f778261 100644 --- a/Modules/getpath.c +++ b/Modules/getpath.c @@ -756,7 +756,7 @@ library_to_dict(PyObject *dict, const char *key) } #elif defined(WITH_NEXT_FRAMEWORK) && !defined(PY_BOOTSTRAP_PYTHON) // _bootstrap_python does not use framework and crashes - static const char modPath[MAXPATHLEN + 1]; + static char modPath[MAXPATHLEN + 1]; static int modPathInitialized = -1; if (modPathInitialized < 0) { NSModule pythonModule;