Skip to content

Commit

Permalink
Handle empty TZ strings at the end of new-style timzeone files correc…
Browse files Browse the repository at this point in the history
…tly.
  • Loading branch information
Andreas Schwab authored and Ulrich Drepper committed Jun 23, 2009
1 parent 58d6003 commit 7a7c2c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2009-06-23 Andreas Schwab <[email protected]>

* time/tzfile.c (__tzfile_read): Don't use an empty TZ string.

2009-06-22 Ulrich Drepper <[email protected]>

* po/id.po: Update from translation team.
Expand Down
4 changes: 4 additions & 0 deletions time/tzfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,10 @@ __tzfile_read (const char *file, size_t extra, char **extrap)
tzspec = __tzstring (tzstr);
}

/* Don't use an empty TZ string. */
if (tzspec != NULL && tzspec[0] == '\0')
tzspec = NULL;

fclose (f);

/* First "register" all timezone names. */
Expand Down

0 comments on commit 7a7c2c2

Please sign in to comment.