mirror of
https://github.com/php/php-src.git
synced 2024-09-22 18:37:25 +00:00
Merge branch 'PHP-7.0'
* PHP-7.0: Fixed Bug #71683 Null pointer dereference in zend_hash_str_find_bucket
This commit is contained in:
commit
01579ae0a6
@ -1632,7 +1632,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]) &&
|
||||
zend_is_auto_global_str("_SERVER", sizeof("_SERVER") - 1) == SUCCESS &&
|
||||
(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))) &&
|
||||
|
16
ext/session/tests/bug71603.phpt
Normal file
16
ext/session/tests/bug71603.phpt
Normal file
@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Bug #71683 Null pointer dereference in zend_hash_str_find_bucket
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--INI--
|
||||
session.save_handler=files
|
||||
session.auto_start=1
|
||||
session.use_only_cookies=0
|
||||
--FILE--
|
||||
<?php
|
||||
ob_start();
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
ok
|
||||
|
Loading…
Reference in New Issue
Block a user