summaryrefslogtreecommitdiff
path: root/Modules/timemodule.c
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2016-12-14 11:22:14 -0800
committerSteve Dower <steve.dower@microsoft.com>2016-12-14 11:22:14 -0800
commit0885519914311a81ba582b26852b07472b386978 (patch)
tree5dc1b261d246b0ffc941e6663402115a29177362 /Modules/timemodule.c
parentbdfc5ff17e9ad6c924aeb5f62ba51e948deec589 (diff)
parentc3c6f71662cdfcc4ab27c9d8df1dbbe96a3bf079 (diff)
downloadcpython-git-0885519914311a81ba582b26852b07472b386978.tar.gz
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 e9edbf3d3f..a3319a289c 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);
}