<!DOCTYPE html>
<html>
  <head>

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