From e9b382cc2e8cd31b392e9a1915ecae98848f23cc Mon Sep 17 00:00:00 2001 From: Matt Wilmas Date: Fri, 5 Jun 2009 18:50:10 +0000 Subject: Added zend_eval_stringl and made create_function(), etc. binary-safe --- ext/mbstring/php_mbregex.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/mbstring/php_mbregex.c') diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index 67efd96acb..015e3a184d 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -918,9 +918,9 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp if (eval) { zval v; /* null terminate buffer */ - smart_str_appendc(&eval_buf, '\0'); + smart_str_0(&eval_buf); /* do eval */ - if (zend_eval_string(eval_buf.c, &v, description TSRMLS_CC) == FAILURE) { + if (zend_eval_stringl(eval_buf.c, eval_buf.len, &v, description TSRMLS_CC) == FAILURE) { efree(description); php_error_docref(NULL TSRMLS_CC,E_ERROR, "Failed evaluating code: %s%s", PHP_EOL, eval_buf.c); /* zend_error() does not return in this case */ -- cgit v1.2.1