]> granicus.if.org Git - php/commit
Bug #66481 Segfaults on session_name()
authorConor McDermottroe <cmcdermottroe@engineyard.com>
Tue, 14 Jan 2014 02:08:13 +0000 (02:08 +0000)
committerYasuo Ohgaki <yohgaki@php.net>
Thu, 16 Jan 2014 02:33:10 +0000 (11:33 +0900)
commit5662ffb295c6f9cb10768d8246f2656aae6b8abb
treecbdda9b0270d626a14741db59e667ca1e50a6939
parentb8774519e25f97bfcb40b365dee17e7492875074
Bug #66481 Segfaults on session_name()

If the previous value of session.name was NULL then any call to
session_name($string) would result in a segmentation fault.

This changes the behaviour to set the value of session.name to
"PHPSESSID" if a blank value is given in php.ini or via -d on the
command line. There is already protection against setting it to NULL via
session_name() or ini_set().
ext/session/session.c
ext/session/tests/bug66481.phpt [new file with mode: 0644]