summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2007-01-10 07:04:49 +0000
committerDmitry Stogov <dmitry@php.net>2007-01-10 07:04:49 +0000
commitae792a06b0362176ddf313859cb09917cb7d0aad (patch)
treeb082f1bb1e6a011b8562d1995e340bf88b5d15a8
parent78ca1de763ef2019c70694c9abe11d012eec377e (diff)
downloadphp-git-ae792a06b0362176ddf313859cb09917cb7d0aad.tar.gz
Fixed SIGSEGV
-rw-r--r--ext/session/session.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/ext/session/session.c b/ext/session/session.c
index 0a0c19979a..6b72224882 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -328,11 +328,10 @@ PHPAPI void php_add_session_var(char *name, size_t namelen TSRMLS_DC)
if (PG(register_globals)) {
zval **sym_global = NULL;
- zend_hash_find(&EG(symbol_table), name, namelen + 1,
- (void *) &sym_global);
-
- if ((Z_TYPE_PP(sym_global) == IS_ARRAY && Z_ARRVAL_PP(sym_global) == &EG(symbol_table)) || *sym_global == PS(http_session_vars)) {
- return;
+ if (zend_hash_find(&EG(symbol_table), name, namelen + 1, (void *) &sym_global) == SUCCESS) {
+ if ((Z_TYPE_PP(sym_global) == IS_ARRAY && Z_ARRVAL_PP(sym_global) == &EG(symbol_table)) || *sym_global == PS(http_session_vars)) {
+ return;
+ }
}
if (sym_global == NULL && sym_track == NULL) {