From c3c6f71662cdfcc4ab27c9d8df1dbbe96a3bf079 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Wed, 14 Dec 2016 11:22:05 -0800 Subject: Fixes maximum usable length of buffer for formatting time zone in localtime(). --- Modules/timemodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/timemodule.c b/Modules/timemodule.c index db0ab58..ebd44ad 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); } -- cgit v0.12