Commit 0eb6a4d32f9 for php.net

commit 0eb6a4d32f961eddd83b7404faa7868ef9b7f9fb
Author: Michael Orlitzky <michael@orlitzky.com>
Date:   Tue Dec 23 12:46:06 2025 -0500

    ext/session/mod_mm.c: add a few missing ZSTR macros

    In eaee504c the session's save_path global was changed to a
    zend_string pointer, but there are a few direct char-pointer accesses
    in ext/session/mod_mm.c that slipped through the cracks. GCC-15
    notices them and fails to build due to the incompatible pointer types.
    Three ZSTR_* wrappers are all that is needed.

    Gentoo-Bug: https://bugs.gentoo.org/967862

    Closes GH-20772.

diff --git a/NEWS b/NEWS
index 676e7bac4e5..a28ef5f450d 100644
--- a/NEWS
+++ b/NEWS
@@ -40,6 +40,9 @@ PHP                                                                        NEWS
   . Fix build on legacy OpenSSL 1.1.0 systems. (Giovanni Giacobbi)
   . Fixed bug #74154 (Phar extractTo creates empty files). (ndossche)

+- Session:
+  . Fix support for MM module. (Michael Orlitzky)
+
 - Sqlite3:
   . Fixed bug GH-20699 (SQLite3Result fetchArray return array|false,
     null returned). (ndossche, plusminmax)
diff --git a/ext/session/mod_mm.c b/ext/session/mod_mm.c
index b997a2bdcff..b794be64696 100644
--- a/ext/session/mod_mm.c
+++ b/ext/session/mod_mm.c
@@ -264,7 +264,7 @@ static void ps_mm_destroy(ps_mm *data)

 PHP_MINIT_FUNCTION(ps_mm)
 {
-	size_t save_path_len = strlen(PS(save_path));
+	size_t save_path_len = ZSTR_LEN(PS(save_path));
 	size_t mod_name_len = strlen(sapi_module.name);
 	size_t euid_len;
 	char *ps_mm_path, euid[30];
@@ -284,8 +284,8 @@ PHP_MINIT_FUNCTION(ps_mm)
 	/* Directory + '/' + File + Module Name + Effective UID + \0 */
 	ps_mm_path = emalloc(save_path_len + 1 + (sizeof(PS_MM_FILE) - 1) + mod_name_len + euid_len + 1);

-	memcpy(ps_mm_path, PS(save_path), save_path_len);
-	if (save_path_len && PS(save_path)[save_path_len - 1] != DEFAULT_SLASH) {
+	memcpy(ps_mm_path, ZSTR_VAL(PS(save_path)), save_path_len);
+	if (save_path_len && ZSTR_VAL(PS(save_path))[save_path_len - 1] != DEFAULT_SLASH) {
 		ps_mm_path[save_path_len] = DEFAULT_SLASH;
 		save_path_len++;
 	}