- Date:
. Fixed bug #67118 (DateTime constructor crash with invalid data). (Anatol)
+ . Fixed bug #67251 (date_parse_from_format out-of-bounds read). (Stas)
- DOM:
. Fixed bug #67081 (DOMDocumentType->internalSubset returns entire DOCTYPE tag,
-/* Generated by re2c 0.13.5 on Sat Jan 25 15:48:30 2014 */
+/* Generated by re2c 0.13.5 on Sun May 11 19:30:56 2014 */
#line 1 "ext/date/lib/parse_date.re"
/*
+----------------------------------------------------------------------+
break;
case '\\': /* escaped char */
+ if(!fptr[1]) {
+ add_pbf_error(s, "Escaped character expected", string, begin);
+ break;
+ }
fptr++;
if (*ptr == *fptr) {
++ptr;
break;
case '\\': /* escaped char */
+ if(!fptr[1]) {
+ add_pbf_error(s, "Escaped character expected", string, begin);
+ break;
+ }
fptr++;
if (*ptr == *fptr) {
++ptr;
--- /dev/null
+--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)
+}