Skip to content

Commit 504c60d

Browse files
committed
Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4
* 'PHP-5.4' of git.php.net:php-src: Fixed bug #66060 (Heap buffer over-read in DateInterval)
2 parents 16d59aa + 12fe4e9 commit 504c60d

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? 2013, PHP 5.4.24
44

5+
- Date:
6+
. Fixed bug #66060 (Heap buffer over-read in DateInterval). (Remi)
7+
58
?? ??? 2013, PHP 5.4.23
69

710
- Core:

ext/date/lib/parse_iso_intervals.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Generated by re2c 0.13.5 on Mon Dec 5 22:02:27 2011 */
1+
/* Generated by re2c 0.13.5 on Wed Nov 27 11:10:58 2013 */
22
#line 1 "ext/date/lib/parse_iso_intervals.re"
33
/*
44
+----------------------------------------------------------------------+
@@ -415,7 +415,7 @@ static int scan(Scanner *s)
415415
break;
416416
}
417417
ptr++;
418-
} while (*ptr);
418+
} while (!s->errors->error_count && *ptr);
419419
s->have_period = 1;
420420
TIMELIB_DEINIT;
421421
return TIMELIB_PERIOD;

ext/date/lib/parse_iso_intervals.re

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ isoweek = year4 "-"? "W" weekofyear;
383383
break;
384384
}
385385
ptr++;
386-
} while (*ptr);
386+
} while (!s->errors->error_count && *ptr);
387387
s->have_period = 1;
388388
TIMELIB_DEINIT;
389389
return TIMELIB_PERIOD;

0 commit comments

Comments
 (0)