summaryrefslogtreecommitdiff
path: root/ext/date/tests/bug67251.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/date/tests/bug67251.phpt')
-rw-r--r--ext/date/tests/bug67251.phpt38
1 files changed, 38 insertions, 0 deletions
diff --git a/ext/date/tests/bug67251.phpt b/ext/date/tests/bug67251.phpt
new file mode 100644
index 0000000000..68c56a1613
--- /dev/null
+++ b/ext/date/tests/bug67251.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Bug #67251 (date_parse_from_format out-of-bounds read)
+--INI--
+date.timezone=Europe/Berlin
+--FILE--
+<?php
+var_dump(date_parse_from_format("\\","AAAABBBB"));
+--EXPECT--
+array(12) {
+ ["year"]=>
+ bool(false)
+ ["month"]=>
+ bool(false)
+ ["day"]=>
+ bool(false)
+ ["hour"]=>
+ bool(false)
+ ["minute"]=>
+ bool(false)
+ ["second"]=>
+ bool(false)
+ ["fraction"]=>
+ bool(false)
+ ["warning_count"]=>
+ int(0)
+ ["warnings"]=>
+ array(0) {
+ }
+ ["error_count"]=>
+ int(2)
+ ["errors"]=>
+ array(1) {
+ [0]=>
+ string(13) "Trailing data"
+ }
+ ["is_localtime"]=>
+ bool(false)
+}