summaryrefslogtreecommitdiff
path: root/ext/filter/tests/bug39846.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/filter/tests/bug39846.phpt')
-rw-r--r--ext/filter/tests/bug39846.phpt12
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/filter/tests/bug39846.phpt b/ext/filter/tests/bug39846.phpt
new file mode 100644
index 0000000..57407f1
--- /dev/null
+++ b/ext/filter/tests/bug39846.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Bug #39846 (ipv4 trailing data validation)
+--SKIPIF--
+<?php if (!extension_loaded("filter")) die("skip"); ?>
+--FILE--
+<?php
+var_dump(filter_var('192.168.1.100random-text-here', FILTER_VALIDATE_IP));
+var_dump(filter_var("192.168.1.155\0foo", FILTER_VALIDATE_IP));
+?>
+--EXPECT--
+bool(false)
+bool(false)