summaryrefslogtreecommitdiff
path: root/ext/session/mod_files.c
diff options
context:
space:
mode:
authorReeze Xia <reeze@php.net>2015-11-07 21:46:21 +0800
committerReeze Xia <reeze@php.net>2015-11-07 21:46:21 +0800
commit0bf3ebb4ba77f38261d9cb21a205a7d31b7f85cf (patch)
tree052fc5d2f0941f99e5d0c789d9ebf9c316922920 /ext/session/mod_files.c
parent99d818f1e901d4eb411a6458a7800df071d8284a (diff)
downloadphp-git-0bf3ebb4ba77f38261d9cb21a205a7d31b7f85cf.tar.gz
Fixed bug #70876 Segmentation fault when regenerating session id with strict mode
The comment *mod_data always be non-NULL is not true. The same as this FIXME: https://github.com/php/php-src/blob/master/ext/session/mod_files.c#L676
Diffstat (limited to 'ext/session/mod_files.c')
-rw-r--r--ext/session/mod_files.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c
index 8301b73f5e..933df93ca8 100644
--- a/ext/session/mod_files.c
+++ b/ext/session/mod_files.c
@@ -702,6 +702,10 @@ PS_VALIDATE_SID_FUNC(files)
{
PS_FILES_DATA;
+ if (!data) {
+ return FAILURE;
+ }
+
return ps_files_key_exists(data, ZSTR_VAL(key));
}