]> granicus.if.org Git - php/commitdiff
Revert "Fix segfault in ext/date since 957aa2"
authorMatteo Beccati <mbeccati@php.net>
Tue, 28 Apr 2015 10:48:00 +0000 (12:48 +0200)
committerMatteo Beccati <mbeccati@php.net>
Tue, 28 Apr 2015 10:56:15 +0000 (12:56 +0200)
This reverts commit b5e5098c50397ed910a79ac1d64b7d0fff2c02e1.

A proper fix from Derick is underway. I apologise for stepping on his toes ;)

ext/date/lib/parse_tz.c

index 1ae252b03430185a7c5e9c407352126a60f23feb..4350b3a984d3035267d267fa314d20597dc9bb4c 100644 (file)
@@ -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));
-               *tzf += (sizeof(unsigned char) * (tz->timecnt));
+               *tzf += (sizeof(int64_t) * (tz->timecnt + 1));
+               *tzf += (sizeof(unsigned char) * (tz->timecnt + 1));
        }
 }