mirror of
https://github.com/php/php-src.git
synced 2024-12-20 23:39:46 +08:00
Fixed valgrind issue in mb_ereg_replace_variation1.phpt
This commit is contained in:
parent
7f52978c67
commit
2505aea153
@ -810,7 +810,7 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp
|
|||||||
OnigUChar *pos;
|
OnigUChar *pos;
|
||||||
OnigUChar *string_lim;
|
OnigUChar *string_lim;
|
||||||
char *description = NULL;
|
char *description = NULL;
|
||||||
char pat_buf[2];
|
char pat_buf[4];
|
||||||
|
|
||||||
const mbfl_encoding *enc;
|
const mbfl_encoding *enc;
|
||||||
|
|
||||||
@ -861,6 +861,8 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp
|
|||||||
convert_to_long_ex(arg_pattern_zval);
|
convert_to_long_ex(arg_pattern_zval);
|
||||||
pat_buf[0] = (char)Z_LVAL_P(arg_pattern_zval);
|
pat_buf[0] = (char)Z_LVAL_P(arg_pattern_zval);
|
||||||
pat_buf[1] = '\0';
|
pat_buf[1] = '\0';
|
||||||
|
pat_buf[2] = '\0';
|
||||||
|
pat_buf[3] = '\0';
|
||||||
|
|
||||||
arg_pattern = pat_buf;
|
arg_pattern = pat_buf;
|
||||||
arg_pattern_len = 1;
|
arg_pattern_len = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user