com php-src: Fixed bug #66060 (Heap buffer over-read in DateInterval): ext/date/lib/parse_iso_intervals.c ext/date/lib/parse _iso_intervals.re
| From: | Johannes Schlüter | Date: | Fri, 18 Jul 2014 22:39:37 +0000 |
| Subject: | com php-src: Fixed bug #66060 (Heap buffer over-read in DateInterval): ext/date/lib/parse_iso_intervals.c ext/date/lib/parse _iso_intervals.re | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-79638@lists.php.net to get a copy of this message | ||
Commit: a0bb3fd6793fe16dbf4d3b5eb3413093088a6b37
Author: Remi Collet <remi@php.net> Wed, 27 Nov 2013 11:13:16 +0100
Committer: Stanislav Malyshev <stas@php.net> Fri, 18 Jul 2014 15:39:37 -0700
Parents: eca037a51dd007032c9ef28bd931e02863e6440d
Branches: PHP-5.3
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a0bb3fd6793fe16dbf4d3b5eb3413093088a6b37
Log:
Fixed bug #66060 (Heap buffer over-read in DateInterval)
Conflicts:
ext/date/lib/parse_iso_intervals.c
Bugs:
https://bugs.php.net/66060
Changed paths:
M ext/date/lib/parse_iso_intervals.c
M ext/date/lib/parse_iso_intervals.re
Diff:
diff --git a/ext/date/lib/parse_iso_intervals.c b/ext/date/lib/parse_iso_intervals.c
index 94dddaa..07c5b76 100644
--- a/ext/date/lib/parse_iso_intervals.c
+++ b/ext/date/lib/parse_iso_intervals.c
@@ -415,7 +415,7 @@ yy6:
break;
}
ptr++;
- } while (*ptr);
+ } while (!s->errors->error_count && *ptr);
s->have_period = 1;
TIMELIB_DEINIT;
return TIMELIB_PERIOD;
diff --git a/ext/date/lib/parse_iso_intervals.re b/ext/date/lib/parse_iso_intervals.re
index 56aa34d..c5e9f67 100644
--- a/ext/date/lib/parse_iso_intervals.re
+++ b/ext/date/lib/parse_iso_intervals..re
@@ -383,7 +383,7 @@ isoweek = year4 "-"? "W" weekofyear;
break;
}
ptr++;
- } while (*ptr);
+ } while (!s->errors->error_count && *ptr);
s->have_period = 1;
TIMELIB_DEINIT;
return TIMELIB_PERIOD;