
23 Nov
2023
23 Nov
'23
6:32 p.m.
I have observed occasional crashes in localtime.c in the current github version. In one of my applications, localtime() is called multiple times for several zones. The condition when the segmentation fault appears are herd to reproduce or demonstrate. This patch in function tzload() however solves the issue: --- localtime.c 2023-11-16 20:18:01.904577574 +0100 +++ a/localtime.c 2023-11-23 19:22:21.062249899 +0100 @@ -769,6 +769,7 @@ } #else union local_storage ls; + memset(&ls, 0, sizeof(ls)); return tzloadbody(name, sp, doextend, &ls); #endif }