Skip to content

Commit c331c3b

Browse files
committed
TEMP: leak memory to check we are hitting the code path in 32bits
1 parent ccc21ec commit c331c3b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ext/tidy/tests/parsing_file_too_large.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ $file = fopen($path, 'w+');
1717
// Write over 4GB
1818
const MIN_FILE_SIZE = 4_294_967_295;
1919

20-
var_dump(fseek($file, MIN_FILE_SIZE+10));
20+
var_dump(fseek($file, MIN_FILE_SIZE));
2121
$s = str_repeat("a", 10);
2222
$bytes_written = fwrite($file, $s);
2323
if ($bytes_written === false) {

ext/tidy/tidy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1363,7 +1363,7 @@ PHP_METHOD(tidy, __construct)
13631363
}
13641364

13651365
if (ZEND_SIZE_T_UINT_OVFL(ZSTR_LEN(contents))) {
1366-
zend_string_release_ex(contents, 0);
1366+
//zend_string_release_ex(contents, 0);
13671367
zend_value_error("Input string is too long");
13681368
RETURN_THROWS();
13691369
}

0 commit comments

Comments
 (0)