diff options
Diffstat (limited to 'time')
-rw-r--r-- | time/Makefile | 3 | ||||
-rw-r--r-- | time/tzfile.c | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/time/Makefile b/time/Makefile index 7620d622a1..80aff61e99 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 1bce14c3f0..2a1a953962 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); |