From a3997030faf1a9642a0c5d569e84bda8870aa64b Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Wed, 26 Oct 2005 13:20:52 +0000 Subject: [PATCH] - Implemented this like the comment says, otherwise it will ofcourse modify both instances of this variable name... --- ext/filter/filter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/filter/filter.c b/ext/filter/filter.c index eb82132879..11e88f86ee 100644 --- a/ext/filter/filter.c +++ b/ext/filter/filter.c @@ -326,7 +326,7 @@ static unsigned int php_sapi_filter(int arg, char *var, char **val, unsigned int /* Make a copy of the variable name, as php_register_variable_ex seems to * modify it */ - orig_var = var; + orig_var = estrdup(var); /* Store the RAW variable internally */ /* FIXME: Should not use php_register_variable_ex as that also registers @@ -351,6 +351,7 @@ static unsigned int php_sapi_filter(int arg, char *var, char **val, unsigned int } php_register_variable_ex(orig_var, &new_var, orig_array_ptr TSRMLS_CC); + efree(orig_var); if (new_val_len) { *new_val_len = out_len; -- 2.40.0