Skip to content

Commit b93062b

Browse files
authored
bpo-34672: Don't pass NULL to gmtime_r. (GH-9312)
1 parent 271818f commit b93062b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Modules/timemodule.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1764,7 +1764,8 @@ PyInit_time(void)
17641764

17651765
#if defined(__linux__) && !defined(__GLIBC__)
17661766
struct tm tm;
1767-
if (gmtime_r(0, &tm) != NULL)
1767+
const time_t zero = 0;
1768+
if (gmtime_r(&zero, &tm) != NULL)
17681769
utc_string = tm.tm_zone;
17691770
#endif
17701771

0 commit comments

Comments
 (0)