Re: [ZEND-ENGINE-CVS] cvs: Zend / zend_compile.c
| From: | Andi Gutmans | Date: | Tue, 13 Aug 2002 16:25:23 +0000 |
| Subject: | Re: [ZEND-ENGINE-CVS] cvs: Zend / zend_compile.c | ||
| References: | 1 | Groups: | php.zend-engine.cvs |
| Request: | Send a blank email to php-zend-engine-cvs+get-309@lists.php.net to get a copy of this message | ||
This patch doesn't look very good. convert_to_string() shouldn't end up with a null in str.val. It could break lots of things and not only the place you just fixed now.
When is this happening?
Andi
At 06:01 AM 8/13/2002 +0000, Masaki Fujimoto wrote:
fujimoto Tue Aug 13 02:01:40 2002 EDTModified files:/Zend zend_compile.cLog: fix segfaults Index: Zend/zend_compile.c diff -u Zend/zend_compile.c:1.234 Zend/zend_compile.c:1.235 --- Zend/zend_compile.c:1.234 Sun Aug 4 02:39:44 2002 +++ Zend/zend_compile.c Tue Aug 13 02:01:40 2002 @@ -2225,8 +2225,10 @@zend_multibyte_filter old_input_filter;convert_to_string(&val->u.constant); + if (!val->u.constant.value.str.val) { + zend_error(E_COMPILE_ERROR, "Invalid encoding specified (without quotes ?)"); + } new_encoding = zend_multibyte_fetch_encoding(val->u.constant.value.str.val); - efree(val->u.constant.value.str.val); if (!new_encoding) { zend_error(E_COMPILE_WARNING, "Unsupported encoding [%s]\n", val->u.constant.value.str.val); } else {@@ -2240,6 +2242,7 @@zend_yyinput_again(old_input_filter, old_encoding TSRMLS_CC); } } + efree(val->u.constant.value.str.val);#endif /* ZEND_MULTIBYTE */} zval_dtor(&var->u.constant);-- Zend Engine CVS Mailing List (http://cvs.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php