]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Handle empty TZ strings at the end of new-style timzeone files correctly.
authorAndreas Schwab <aschwab@redhat.com>
Tue, 23 Jun 2009 16:13:30 +0000 (09:13 -0700)
committerUlrich Drepper <drepper@redhat.com>
Tue, 23 Jun 2009 16:13:30 +0000 (09:13 -0700)
ChangeLog
time/tzfile.c

index 23ab3f8052d5f3827adc877e030510218cd4325b..4ef72fc02c64bbcde6fb5a7d9c420d1c1243675a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index d8bd55a130963fec0a7f9f41cf1751f8805d5461..f4cba46e5042ad4515440d52025a1ca4bfd9f11b 100644 (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.  */