summaryrefslogtreecommitdiff
path: root/ext/standard/tests/file/bug72114.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/tests/file/bug72114.phpt')
-rw-r--r--ext/standard/tests/file/bug72114.phpt12
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/standard/tests/file/bug72114.phpt b/ext/standard/tests/file/bug72114.phpt
new file mode 100644
index 0000000000..5e591ee478
--- /dev/null
+++ b/ext/standard/tests/file/bug72114.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Bug #72114 (Integer underflow / arbitrary null write in fread/gzread)
+--FILE--
+<?php
+ini_set('memory_limit', "2500M");
+$fp = fopen("/dev/zero", "r");
+fread($fp, 2147483648);
+?>
+Done
+--EXPECTF--
+Warning: fread(): Length parameter must be no more than 2147483647 in %s/bug72114.php on line %d
+Done