From 083fc401fed908f4def3181090b59fe1cd94e2f7 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Tue, 29 Oct 2002 12:53:58 +0000 Subject: [PATCH] fix overrun --- ext/standard/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.50.1