com php-src: Fixed bug #71754 (Regression in PHP7.0: trivial script segfaults php-cgi): NEWS ext/session/session.c
| From: | Xinchen Hui | Date: | Thu, 10 Mar 2016 07:02:10 +0000 |
| Subject: | com php-src: Fixed bug #71754 (Regression in PHP7.0: trivial script segfaults php-cgi): NEWS ext/session/session.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-91304@lists.php.net to get a copy of this message | ||
Commit: 98c625a31cc329aa45c48d9c376c6197e278a3a5
Author: Xinchen Hui <laruence@gmail.com> Thu, 10 Mar 2016 15:02:10 +0800
Parents: 9833c76d3fb6bf4c08aaa4542e87dc33a9b8f6ee
Branches: PHP-7.0 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=98c625a31cc329aa45c48d9c376c6197e278a3a5
Log:
Fixed bug #71754 (Regression in PHP7.0: trivial script segfaults php-cgi)
Bugs:
https://bugs.php.net/71754
Changed paths:
M NEWS
M ext/session/session.c
Diff:
diff --git a/NEWS b/NEWS
index 0b21ac4..e70e4b4 100644
--- a/NEWS
+++ b/NEWS
@@ -50,6 +50,10 @@ PHP NEWS
- phpdbg:
. Fixed crash when advancing (except step) inside an internal function. (Bob)
+- Session:
+ . Fixed bug #71754 (Regression in PHP7.0: trivial script segfaults php-cgi).
+ (Laruence)
+
- SPL:
. Fixed bug #71617 (private properties lost when unserializing ArrayObject).
(Nikita)
diff --git a/ext/session/session.c b/ext/session/session.c
index 994d762..6e0c997 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -1611,6 +1611,7 @@ PHPAPI void php_session_start(void) /* {{{ */
* '<session-name>=<session-id>' to allow URLs of the form
* http://yoursite/<session-name>=<session-id>/script.php
*/
if (PS(define_sid) && !PS(id) &&
+ !Z_ISUNDEF(PG(http_globals)[TRACK_VARS_SERVER]) &&
(data = zend_hash_str_find(Z_ARRVAL(PG(http_globals)[TRACK_VARS_SERVER]),
"REQUEST_URI", sizeof("REQUEST_URI") - 1)) &&
Z_TYPE_P(data) == IS_STRING &&
(p = strstr(Z_STRVAL_P(data), PS(session_name))) &&