]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fixes maximum usable length of buffer for formatting time zone in localtime().
authorSteve Dower <steve.dower@microsoft.com>
Wed, 14 Dec 2016 19:22:05 +0000 (11:22 -0800)
committerSteve Dower <steve.dower@microsoft.com>
Wed, 14 Dec 2016 19:22:05 +0000 (11:22 -0800)
Modules/timemodule.c

index db0ab5805c50d9e7514eba464877850afc41df49..ebd44ad525bd81884584f37a15d5cf8dec454869 100644 (file)
@@ -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);
     }