Kaydet (Commit) 08855199 authored tarafından Steve Dower's avatar Steve Dower

Fixes maximum usable length of buffer for formatting time zone in localtime().

......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment