mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fix GH-13856: Member access within null pointer of type 'ps_files' in ext/session/mod_files.c
We should not mark the session as opened when there was a failure in open. Closes GH-13858.
This commit is contained in:
parent
ba4c82fd80
commit
46f45a51b4
3 changed files with 27 additions and 2 deletions
|
@ -47,8 +47,6 @@ PHP_METHOD(SessionHandler, open)
|
|||
|
||||
PS_SANITY_CHECK;
|
||||
|
||||
PS(mod_user_is_open) = 1;
|
||||
|
||||
zend_try {
|
||||
ret = PS(default_mod)->s_open(&PS(mod_data), save_path, session_name);
|
||||
} zend_catch {
|
||||
|
@ -56,6 +54,10 @@ PHP_METHOD(SessionHandler, open)
|
|||
zend_bailout();
|
||||
} zend_end_try();
|
||||
|
||||
if (SUCCESS == ret) {
|
||||
PS(mod_user_is_open) = 1;
|
||||
}
|
||||
|
||||
RETURN_BOOL(SUCCESS == ret);
|
||||
}
|
||||
/* }}} */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue