From 361ae6886e6cda3fc786b36bcb6bc149267340a0 Mon Sep 17 00:00:00 2001 From: "Thies C. Arntzen" Date: Mon, 21 Feb 2000 12:13:27 +0000 Subject: [PATCH] @- Fixed crash when magic_quotes were switched off. (Thies) --- main/php_variables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/php_variables.c b/main/php_variables.c index 6a88b3bd9d2..1897610d6c7 100644 --- a/main/php_variables.c +++ b/main/php_variables.c @@ -37,7 +37,7 @@ PHPAPI void php_register_variable(char *var, char *strval, zval *track_vars_arra if (PG(magic_quotes_gpc)) { new_entry.value.str.val = php_addslashes(strval, new_entry.value.str.len, &new_entry.value.str.len, 0); } else { - strval = estrndup(strval, new_entry.value.str.len); + new_entry.value.str.val = estrndup(strval, new_entry.value.str.len); } new_entry.type = IS_STRING;