diff options
author | Stanislav Malyshev <stas@php.net> | 2014-05-11 21:09:11 -0700 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2014-05-11 21:09:11 -0700 |
commit | 466b8aa444523b9b53811487f0f6ca4421bfb5e1 (patch) | |
tree | d0fbadc19c644cf7d19d333d48c6ea8afacd04f9 /ext/date/tests/bug67253.phpt | |
parent | 1e2818b143760a79a0887861bd6221b158355073 (diff) | |
download | php-git-466b8aa444523b9b53811487f0f6ca4421bfb5e1.tar.gz |
fix bug #67253: timelib_meridian_with_check out-of-bounds read
Diffstat (limited to 'ext/date/tests/bug67253.phpt')
-rw-r--r-- | ext/date/tests/bug67253.phpt | 44 |
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) +} + |