com php-src: Merge branch 'bug67252' into PHP-5.4: ext/date/lib /parse_date.c ext/date/lib/parse_date.re

From: Date: Tue, 13 May 2014 23:47:27 +0000
Subject: com php-src: Merge branch 'bug67252' into PHP-5.4: ext/date/lib /parse_date.c ext/date/lib/parse_date.re
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-78326@lists.php.net to get a copy of this message
Commit: 0094fd096905d2d3e53b12c76cfc27976dc2db03 Author: Stanislav Malyshev <stas@php.net> Tue, 13 May 2014 16:44:24 -0700 Parents: 9103c9eb4fccfa5f71283c0e631285252af95e5e 466b8aa444523b9b53811487f0f6ca4421bfb5e1 Branches: PHP-5.4 PHP-5.5 PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0094fd096905d2d3e53b12c76cfc27976dc2db03 Log: Merge branch 'bug67252' into PHP-5.4 * bug67252: fix bug #67253: timelib_meridian_with_check out-of-bounds read Fix bug #67252: convert_uudecode out-of-bounds read Bugs: https://bugs.php.net/67252 https://bugs.php.net/67253 Changed paths: MM ext/date/lib/parse_date.c MM ext/date/lib/parse_date.re Diff: diff --cc ext/date/lib/parse_date.c index 47b4817,b6cbfa1..14a6d73 --- a/ext/date/lib/parse_date.c +++ b/ext/date/lib/parse_date.c @@@ -1,4 -1,4 +1,4 @@@ - /* Generated by re2c 0.13.5 on Sat Jan 25 15:48:30 2014 */ -/* Generated by re2c 0.13.5 on Sun May 11 21:06:56 2014 */ ++/* Generated by re2c 0.13.5 on Tue May 13 16:47:20 2014 */ #line 1 "ext/date/lib/parse_date.re" /* +----------------------------------------------------------------------+ @@@ -403,9 -403,12 +403,12 @@@ static timelib_sll timelib_meridian_wit { timelib_sll retval = 0; - while (!strchr("AaPp", **ptr)) { + while (**ptr && !strchr("AaPp", **ptr)) { ++*ptr; } - if(!**ptr) { - return TIMELIB_UNSET; - } ++ if(!**ptr) { ++ return TIMELIB_UNSET; ++ } if (**ptr == 'a' || **ptr == 'A') { if (h == 12) { retval = -12; diff --cc ext/date/lib/parse_date.re index 5b923d4,3dc1969..dad5bb4 --- a/ext/date/lib/parse_date.re +++ b/ext/date/lib/parse_date.re @@@ -401,9 -401,12 +401,12 @@@ static timelib_sll timelib_meridian_wit { timelib_sll retval = 0; - while (!strchr("AaPp", **ptr)) { + while (**ptr && !strchr("AaPp", **ptr)) { ++*ptr; } - if(!**ptr) { - return TIMELIB_UNSET; - } ++ if(!**ptr) { ++ return TIMELIB_UNSET; ++ } if (**ptr == 'a' || **ptr == 'A') { if (h == 12) { retval = -12;

« previous php.cvs (#78326) next »