commit | 0885519914311a81ba582b26852b07472b386978 | [log] [tgz] |
---|---|---|
author | Steve Dower <steve.dower@microsoft.com> | Wed Dec 14 11:22:14 2016 -0800 |
committer | Steve Dower <steve.dower@microsoft.com> | Wed Dec 14 11:22:14 2016 -0800 |
tree | 5dc1b261d246b0ffc941e6663402115a29177362 | |
parent | bdfc5ff17e9ad6c924aeb5f62ba51e948deec589 [diff] | |
parent | c3c6f71662cdfcc4ab27c9d8df1dbbe96a3bf079 [diff] |
Fixes maximum usable length of buffer for formatting time zone in localtime().
diff --git a/Modules/timemodule.c b/Modules/timemodule.c index e9edbf3..a3319a2 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c
@@ -398,7 +398,7 @@ struct tm local = buf; char zone[100]; int gmtoff; - strftime(zone, sizeof(buf), "%Z", &buf); + strftime(zone, sizeof(zone), "%Z", &buf); gmtoff = timegm(&buf) - when; return tmtotuple(&local, zone, gmtoff); }