From 7a7c2c24654f7ab69b1cec72c329c8d73f0e4c04 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 23 Jun 2009 09:13:30 -0700 Subject: Handle empty TZ strings at the end of new-style timzeone files correctly. --- time/tzfile.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'time/tzfile.c') diff --git a/time/tzfile.c b/time/tzfile.c index d8bd55a..f4cba46 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. */ -- cgit v1.1