1 |
From 12fe4e90be7bfa2a763197079f68f5568a14e071 Mon Sep 17 00:00:00 2001 |
2 |
From: Remi Collet <remi@php.net> |
3 |
Date: Wed, 27 Nov 2013 11:13:16 +0100 |
4 |
Subject: [PATCH] Fixed bug #66060 (Heap buffer over-read in DateInterval) |
5 |
|
6 |
--- |
7 |
NEWS | 3 +++ |
8 |
ext/date/lib/parse_iso_intervals.c | 4 ++-- |
9 |
ext/date/lib/parse_iso_intervals.re | 2 +- |
10 |
3 files changed, 6 insertions(+), 3 deletions(-) |
11 |
|
12 |
diff --git a/ext/date/lib/parse_iso_intervals.c b/ext/date/lib/parse_iso_intervals.c |
13 |
index bd1ad05..480ea38 100644 |
14 |
--- a/ext/date/lib/parse_iso_intervals.c |
15 |
+++ b/ext/date/lib/parse_iso_intervals.c |
16 |
@@ -415,7 +415,7 @@ yy6: |
17 |
break; |
18 |
} |
19 |
ptr++; |
20 |
- } while (*ptr); |
21 |
+ } while (!s->errors->error_count && *ptr); |
22 |
s->have_period = 1; |
23 |
TIMELIB_DEINIT; |
24 |
return TIMELIB_PERIOD; |
25 |
diff --git a/ext/date/lib/parse_iso_intervals.re b/ext/date/lib/parse_iso_intervals.re |
26 |
index 56aa34d..c5e9f67 100644 |
27 |
--- a/ext/date/lib/parse_iso_intervals.re |
28 |
+++ b/ext/date/lib/parse_iso_intervals.re |
29 |
@@ -383,7 +383,7 @@ isoweek = year4 "-"? "W" weekofyear; |
30 |
break; |
31 |
} |
32 |
ptr++; |
33 |
- } while (*ptr); |
34 |
+ } while (!s->errors->error_count && *ptr); |
35 |
s->have_period = 1; |
36 |
TIMELIB_DEINIT; |
37 |
return TIMELIB_PERIOD; |
38 |
-- |
39 |
1.8.4.3 |
40 |
|