com php-src: Fix segfault in ext/date since 957aa2: ext/date/lib/parse_tz.c
| From: | Matteo Beccati | Date: | Tue, 28 Apr 2015 08:57:18 +0000 |
| Subject: | com php-src: Fix segfault in ext/date since 957aa2: ext/date/lib/parse_tz.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-86518@lists.php.net to get a copy of this message | ||
Commit: b5e5098c50397ed910a79ac1d64b7d0fff2c02e1
Author: Matteo Beccati <mbeccati@php.net> Tue, 28 Apr 2015 10:57:18 +0200
Parents: 13c32a102c7626673f41dfecba4188a6c6c6934c
Branches: PHP-5.5 PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b5e5098c50397ed910a79ac1d64b7d0fff2c02e1
Log:
Fix segfault in ext/date since 957aa2
Changed paths:
M ext/date/lib/parse_tz.c
Diff:
diff --git a/ext/date/lib/parse_tz.c b/ext/date/lib/parse_tz.c
index 89b8af7..32ed639 100644
--- a/ext/date/lib/parse_tz.c
+++ b/ext/date/lib/parse_tz.c
@@ -89,8 +89,8 @@ static void read_header(const unsigned char **tzf, timelib_tzinfo *tz)
static void skip_transistions_64bit(const unsigned char **tzf, timelib_tzinfo *tz)
{
if (tz->timecnt) {
- *tzf += (sizeof(int64_t) * (tz->timecnt + 1));
- *tzf += (sizeof(unsigned char) * (tz->timecnt + 1));
+ *tzf += (sizeof(int64_t) * (tz->timecnt));
+ *tzf += (sizeof(unsigned char) * (tz->timecnt));
}
}