summaryrefslogtreecommitdiff
path: root/ext/date/tests/bug67253.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/date/tests/bug67253.phpt')
-rw-r--r--ext/date/tests/bug67253.phpt44
1 files changed, 44 insertions, 0 deletions
diff --git a/ext/date/tests/bug67253.phpt b/ext/date/tests/bug67253.phpt
new file mode 100644
index 0000000000..b28cbe63c1
--- /dev/null
+++ b/ext/date/tests/bug67253.phpt
@@ -0,0 +1,44 @@
+--TEST--
+Bug #67253 (timelib_meridian_with_check out-of-bounds read)
+--INI--
+date.timezone=Europe/Berlin
+--FILE--
+<?php
+$z = '';
+var_dump(date_parse_from_format("aHa0", "0=G{$z}9UCNnF"));
+--EXPECT--
+array(12) {
+ ["year"]=>
+ bool(false)
+ ["month"]=>
+ bool(false)
+ ["day"]=>
+ bool(false)
+ ["hour"]=>
+ int(0)
+ ["minute"]=>
+ int(0)
+ ["second"]=>
+ int(0)
+ ["fraction"]=>
+ bool(false)
+ ["warning_count"]=>
+ int(0)
+ ["warnings"]=>
+ array(0) {
+ }
+ ["error_count"]=>
+ int(3)
+ ["errors"]=>
+ array(3) {
+ [0]=>
+ string(51) "Meridian can only come after an hour has been found"
+ [1]=>
+ string(29) "A meridian could not be found"
+ [9]=>
+ string(12) "Data missing"
+ }
+ ["is_localtime"]=>
+ bool(false)
+}
+