From: Andreas Schwab Date: Tue, 23 Jun 2009 16:13:30 +0000 (-0700) Subject: Handle empty TZ strings at the end of new-style timzeone files correctly. X-Git-Tag: fedora/glibc-2.10.90-1~3^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a7c2c24654f7ab69b1cec72c329c8d73f0e4c04;p=thirdparty%2Fglibc.git Handle empty TZ strings at the end of new-style timzeone files correctly. --- diff --git a/ChangeLog b/ChangeLog index 23ab3f8052d..4ef72fc02c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-06-23 Andreas Schwab + + * time/tzfile.c (__tzfile_read): Don't use an empty TZ string. + 2009-06-22 Ulrich Drepper * po/id.po: Update from translation team. diff --git a/time/tzfile.c b/time/tzfile.c index d8bd55a1309..f4cba46e504 100644 --- a/time/tzfile.c +++ b/time/tzfile.c @@ -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. */