]> granicus.if.org Git - php/commitdiff
fix overrun
authorMarcus Boerger <helly@php.net>
Tue, 29 Oct 2002 12:53:58 +0000 (12:53 +0000)
committerMarcus Boerger <helly@php.net>
Tue, 29 Oct 2002 12:53:58 +0000 (12:53 +0000)
ext/standard/file.c

index 44d604eb34ca6e932dc9cedfa07cf3830a19d5ff..51109049439711c9cd417a08cfa3cb989e9b52e0 100644 (file)
@@ -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);