]> granicus.if.org Git - php/commitdiff
@- Fixed crash when magic_quotes were switched off. (Thies)
authorThies C. Arntzen <thies@php.net>
Mon, 21 Feb 2000 12:13:27 +0000 (12:13 +0000)
committerThies C. Arntzen <thies@php.net>
Mon, 21 Feb 2000 12:13:27 +0000 (12:13 +0000)
main/php_variables.c

index 6a88b3bd9d239b0e015931a65204530718cb0369..1897610d6c7fd6186659834f28cca3af7423697f 100644 (file)
@@ -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;