]> granicus.if.org Git - php/commitdiff
Merge branch 'bug67252' into PHP-5.4
authorStanislav Malyshev <stas@php.net>
Tue, 13 May 2014 23:44:24 +0000 (16:44 -0700)
committerStanislav Malyshev <stas@php.net>
Tue, 13 May 2014 23:47:27 +0000 (16:47 -0700)
* bug67252:
  fix bug #67253: timelib_meridian_with_check out-of-bounds read
  Fix bug #67252: convert_uudecode out-of-bounds read

1  2 
ext/date/lib/parse_date.c
ext/date/lib/parse_date.re

index 47b48178c2dc5fe1e1a712b1a13acd08acdd2789,b6cbfa13fa71a40dada3b0a884940cb5dde2bd38..14a6d73c32a5ca5b9116d8154f4db52daac22ff1
@@@ -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;
index 5b923d4bc41b2d06c1e13bff020dde8e145faeae,3dc1969d43ae58874683521d01ca7bee96d28099..dad5bb4b2511e1ab28ebd87000a633e2a6298961
@@@ -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;