Skip to content

Commit

Permalink
timezone __secs_to_zone stub: guard against null pointer dereference
Browse files Browse the repository at this point in the history
Closes #506
  • Loading branch information
pchickey committed Jun 16, 2024
1 parent 3184536 commit cfe7250
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions libc-top-half/musl/src/time/__tz.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,10 +434,14 @@ weak_alias(__tzset, tzset);
void __secs_to_zone(long long t, int local, int *isdst, int *offset, long *oppoff, const char **zonename)
{
// Minimalist implementation for now.
*isdst = 0;
*offset = 0;
*oppoff = 0;
*zonename = __utc;
if (isdst)
*isdst = 0;
if (offset)
*offset = 0;
if (oppoff)
*oppoff = 0;
if (zonename)
*zonename = __utc;
}
#endif

Expand Down

0 comments on commit cfe7250

Please sign in to comment.