summary refs log tree commit diff
path: root/time
diff options
context:
space:
mode:
authorAndreas Schwab <aschwab@redhat.com>2009-06-23 09:13:30 -0700
committerUlrich Drepper <drepper@redhat.com>2009-06-23 09:13:30 -0700
commit7a7c2c24654f7ab69b1cec72c329c8d73f0e4c04 (patch)
tree3e36fb290b088727ae55b85cc1ba8dedf3a6cd3f /time
parent58d60030dfd14a640e30cbcc231b12a63cdba7d0 (diff)
downloadglibc-7a7c2c24654f7ab69b1cec72c329c8d73f0e4c04.tar.gz
glibc-7a7c2c24654f7ab69b1cec72c329c8d73f0e4c04.tar.xz
glibc-7a7c2c24654f7ab69b1cec72c329c8d73f0e4c04.zip
Handle empty TZ strings at the end of new-style timzeone files correctly.
Diffstat (limited to 'time')
-rw-r--r--time/tzfile.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/time/tzfile.c b/time/tzfile.c
index d8bd55a130..f4cba46e50 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.  */