Browse Source

Fix bug #67972 (SessionHandler Invalid memory read create_sid()).

SessionHandler::create_sid() didn't check if PS(default_mod) was initialised
before attempting to call its create_sid() handler.
pull/870/head
Adam Harvey 12 years ago
parent
commit
bc44eb6172
  1. 3
      NEWS
  2. 2
      ext/session/mod_user_class.c
  3. 10
      ext/session/tests/bug67972.phpt

3
NEWS

@ -2,7 +2,8 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2014, PHP 5.5.18
- Session:
. Fixed bug #67972 (SessionHandler Invalid memory read create_sid()). (Adam)
11 Sep 2014, PHP 5.5.17

2
ext/session/mod_user_class.c

@ -148,6 +148,8 @@ PHP_METHOD(SessionHandler, create_sid)
{
char *id;
PS_SANITY_CHECK;
if (zend_parse_parameters_none() == FAILURE) {
return;
}

10
ext/session/tests/bug67972.phpt

@ -0,0 +1,10 @@
--TEST--
Bug #67972: SessionHandler Invalid memory read create_sid()
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--
<?php
(new SessionHandler)->create_sid();
--EXPECTF--
Fatal error: SessionHandler::create_sid(): Cannot call default session handler in %s on line %d
Loading…
Cancel
Save