From: Benjamin Peterson Date: Fri, 14 Sep 2018 17:39:13 +0000 (-0700) Subject: bpo-34672: Don't pass NULL to gmtime_r. (GH-9312) X-Git-Tag: v3.8.0a1~987 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b93062b7fbc965cd0d522f597ed51eb4e493dfc2;p=thirdparty%2FPython%2Fcpython.git bpo-34672: Don't pass NULL to gmtime_r. (GH-9312) --- diff --git a/Modules/timemodule.c b/Modules/timemodule.c index 8118b31c9173..1a4cff23d65e 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -1764,7 +1764,8 @@ PyInit_time(void) #if defined(__linux__) && !defined(__GLIBC__) struct tm tm; - if (gmtime_r(0, &tm) != NULL) + const time_t zero = 0; + if (gmtime_r(&zero, &tm) != NULL) utc_string = tm.tm_zone; #endif