summaryrefslogtreecommitdiffstats
path: root/Modules/timemodule.c
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2016-12-14 19:22:14 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2016-12-14 19:22:14 (GMT)
commit0885519914311a81ba582b26852b07472b386978 (patch)
tree5dc1b261d246b0ffc941e6663402115a29177362 /Modules/timemodule.c
parentbdfc5ff17e9ad6c924aeb5f62ba51e948deec589 (diff)
parentc3c6f71662cdfcc4ab27c9d8df1dbbe96a3bf079 (diff)
downloadcpython-0885519914311a81ba582b26852b07472b386978.zip
cpython-0885519914311a81ba582b26852b07472b386978.tar.gz
cpython-0885519914311a81ba582b26852b07472b386978.tar.bz2
Fixes maximum usable length of buffer for formatting time zone in localtime().
Diffstat (limited to 'Modules/timemodule.c')
-rw-r--r--Modules/timemodule.c2
1 files changed, 1 insertions, 1 deletions
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 @@ time_localtime(PyObject *self, PyObject *args)
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);
}