more checking

SCCS-file: localtime.c
SCCS-SID: 1.13
This commit is contained in:
Arthur David Olson
2012-07-18 03:01:35 -04:00
committed by Paul Eggert
parent 877922ece0
commit bd192fb437
+2
View File
@@ -51,6 +51,8 @@ register char * tzname;
** Note that a zero-length time zone abbreviation is *not* considered
** to be an error.
*/
if (tzp->tz_timecnt < 0 || tzp->tz_timecnt > TZ_MAX_TIMES)
goto oops;
for (i = 0; i < tzp->tz_timecnt; ++i)
if (tzp->tz_types[i] > TZ_MAX_TYPES)
goto oops;