Browse Source

Fixed bug #39791 (Crash in strtotime() on overly long relative date

multipliers).
experimental/5.2-WITH_DRCP
Ilia Alshanetsky 19 years ago
parent
commit
f5b6604376
  1. 2
      NEWS
  2. 35362
      ext/date/lib/parse_date.c
  3. 5
      ext/date/lib/parse_date.re

2
NEWS

@ -50,6 +50,8 @@ PHP NEWS
- Fixed FastCGI impersonation for persistent connections on Windows. (Dmitry)
- Fixed wrong signature initialization in imagepng (Takeshi Abe)
- Added optimization for imageline with horizontal and vertial lines (Pierre)
- Fixed bug #39791 (Crash in strtotime() on overly long relative date
multipliers). (Ilia)
- Fixed bug #39780 (PNG image with CRC/data error raises fatal error) (Pierre)
- Fixed bug #39775 ("Indirect modification ..." message is not shown). (Dmitry)
- Fixed bug #39763 (magic quotes are applied twice by ext/filter in

35362
ext/date/lib/parse_date.c
File diff suppressed because it is too large
View File

5
ext/date/lib/parse_date.re

@ -590,7 +590,10 @@ static void timelib_set_relative(char **ptr, timelib_sll amount, int behavior, S
{
const timelib_relunit* relunit;
relunit = timelib_lookup_relunit(ptr);
if (!(relunit = timelib_lookup_relunit(ptr))) {
return;
}
switch (relunit->unit) {
case TIMELIB_SECOND: s->time->relative.s += amount * relunit->multiplier; break;
case TIMELIB_MINUTE: s->time->relative.i += amount * relunit->multiplier; break;

Loading…
Cancel
Save