diff options
| author | Stanislav Malyshev <stas@php.net> | 2001-11-11 12:41:14 +0000 |
|---|---|---|
| committer | Stanislav Malyshev <stas@php.net> | 2001-11-11 12:41:14 +0000 |
| commit | 88c66d4859ba3ecc0b015259f78e905a5fe4df8c (patch) | |
| tree | b1dc8f25c24f7bdc2de78728f678aa69fb113bc3 /ext/standard/basic_functions.c | |
| parent | 66411756dd36cba0daa91a2dc38ca266b09976ed (diff) | |
| download | php-git-88c66d4859ba3ecc0b015259f78e905a5fe4df8c.tar.gz | |
Fix crash bug on malformed .ini file
Diffstat (limited to 'ext/standard/basic_functions.c')
| -rw-r--r-- | ext/standard/basic_functions.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 45ebbdf50d..94869275c6 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -2632,6 +2632,10 @@ static void php_simple_ini_parser_cb(zval *arg1, zval *arg2, int callback_type, switch (callback_type) { case ZEND_INI_PARSER_ENTRY: + if(!arg2) { + /* bare string - nothing to do */ + break; + } ALLOC_ZVAL(element); *element = *arg2; zval_copy_ctor(element); @@ -2655,6 +2659,11 @@ static void php_ini_parser_cb_with_sections(zval *arg1, zval *arg2, int callback { zval *active_arr; + if(!arg2) { + /* bare string - nothing to do */ + break; + } + if (BG(active_ini_file_section)) { active_arr = BG(active_ini_file_section); } else { |
