]> granicus.if.org Git - php/commitdiff
Fixed bug #70529 Session read causes "String is not zero-terminated" error
authorYasuo Ohgaki <yohgaki@php.net>
Sat, 19 Sep 2015 02:24:01 +0000 (11:24 +0900)
committerYasuo Ohgaki <yohgaki@php.net>
Sat, 19 Sep 2015 02:26:14 +0000 (11:26 +0900)
NEWS
ext/session/mod_files.c

diff --git a/NEWS b/NEWS
index fb99eb0c4e2d656d1fb23b27a1c869853298d140..57b7a73c11eac19e3a0b7e9bcc00bdba344c5b6d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,10 @@ PHP                                                                        NEWS
   . Fixed bug #70481 (Memory leak in auto_global_copy_ctor() in ZTS build).
     (Laruence)
 
+- Session:
+  . Fixed bug #70529 (Session read causes "String is not zero-terminated" error).
+    (Yasuo)
+
 
 17 Sep 2015, PHP 7.0.0 RC 3
 
index f5256206ff7a944831b91a6e64245f104f726687..8301b73f5ee3edce422e66f4f53cf08842c0da55 100644 (file)
@@ -519,6 +519,7 @@ PS_READ_FUNC(files)
                return FAILURE;
        }
 
+       ZSTR_VAL(*val)[ZSTR_LEN(*val)] = '\0';
        return SUCCESS;
 }