From d55300298e0e3ec0bdbb58ff3dcfda113d21852e Mon Sep 17 00:00:00 2001 From: Matt Wilmas Date: Fri, 5 Jun 2009 18:50:32 +0000 Subject: MFH: 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 8adf7549d0..40e89ae1d6 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -914,9 +914,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