From: Marcus Boerger Date: Tue, 29 Oct 2002 12:53:58 +0000 (+0000) Subject: fix overrun X-Git-Tag: php-4.3.0RC1~464 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=083fc401fed908f4def3181090b59fe1cd94e2f7;p=php fix overrun --- diff --git a/ext/standard/file.c b/ext/standard/file.c index 44d604eb34..5110904943 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -501,7 +501,8 @@ PHP_FUNCTION(file) p++; parse_eol: if (PG(magic_quotes_runtime)) { - slashed = php_addslashes(s, (p-s), &len, 1 TSRMLS_CC); + // s is in target_buf which is freed at the end of the function + slashed = php_addslashes(s, (p-s), &len, 0 TSRMLS_CC); add_index_stringl(return_value, i++, slashed, len, 0); } else { add_index_stringl(return_value, i++, estrndup(s, p-s), p-s, 0);