Handle empty TZ strings at the end of new-style timzeone files correctly.

This commit is contained in:
Andreas Schwab 2009-06-23 09:13:30 -07:00 committed by Ulrich Drepper
parent 58d60030df
commit 7a7c2c2465
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2009-06-23 Andreas Schwab <aschwab@redhat.com>
* time/tzfile.c (__tzfile_read): Don't use an empty TZ string.
2009-06-22 Ulrich Drepper <drepper@redhat.com>
* po/id.po: Update from translation team.

View File

@ -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. */