aboutsummaryrefslogtreecommitdiff
path: root/time
diff options
context:
space:
mode:
Diffstat (limited to 'time')
-rw-r--r--time/Makefile3
-rw-r--r--time/tzfile.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/time/Makefile b/time/Makefile
index 7620d62..80aff61 100644
--- a/time/Makefile
+++ b/time/Makefile
@@ -40,3 +40,6 @@ tz-cflags = -DTZDIR='"$(zonedir)"' \
CFLAGS-tzfile.c = $(tz-cflags)
CFLAGS-tzset.c = $(tz-cflags)
+
+# Don't warn about Y2k problem in strftime format string.
+CFLAGS-test_time.c = -Wno-format
diff --git a/time/tzfile.c b/time/tzfile.c
index 1bce14c..2a1a953 100644
--- a/time/tzfile.c
+++ b/time/tzfile.c
@@ -230,6 +230,8 @@ __tzfile_read (const char *file)
|| fread_unlocked (&types[i].isdst, 1, 1, f) != 1
|| fread_unlocked (&types[i].idx, 1, 1, f) != 1)
goto lose;
+ if (types[i].isdst > 1)
+ goto lose;
if (types[i].idx >= chars) /* Bogus index in data file. */
goto lose;
types[i].offset = (long int) decode (x);