From: Steve Dower Date: Wed, 14 Dec 2016 19:22:05 +0000 (-0800) Subject: Fixes maximum usable length of buffer for formatting time zone in localtime(). X-Git-Tag: v3.6.1rc1~312 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c3c6f71662cdfcc4ab27c9d8df1dbbe96a3bf079;p=thirdparty%2FPython%2Fcpython.git Fixes maximum usable length of buffer for formatting time zone in localtime(). --- diff --git a/Modules/timemodule.c b/Modules/timemodule.c index db0ab5805c50..ebd44ad525bd 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); }