Skip to content

Commit 5fe046c

Browse files
author
Sascha Schumann
committed
session_decode should not segfault
1 parent e24247e commit 5fe046c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/session/session.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,6 +1428,9 @@ PHP_FUNCTION(session_decode)
14281428
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE)
14291429
WRONG_PARAM_COUNT;
14301430

1431+
if (PS(session_status) == php_session_none)
1432+
RETURN_FALSE;
1433+
14311434
convert_to_string_ex(str);
14321435

14331436
php_session_decode(Z_STRVAL_PP(str), Z_STRLEN_PP(str) TSRMLS_CC);

0 commit comments

Comments
 (0)