1
0
mirror of https://frontier.innolan.net/rainlance/amiga-tz.git synced 2026-05-06 16:58:22 +00:00

Fix stack buffer overrun in mktime and similar functions.

* localtime.c (time1): Declare 'types' array to have TZ_MAX_TIMES
entries, not TZ_MAX_TYPES entries.
* NEWS: Document this.
This commit is contained in:
Paul Eggert
2014-06-14 23:19:23 -07:00
parent 05c08c6a63
commit ce7bf999f7
2 changed files with 5 additions and 1 deletions

4
NEWS
View File

@@ -7,6 +7,10 @@ Unreleased, experimental changes
Finland's 1942 fall-back transition was October 4 at 01:00, not
October 3 at 00:00. (Thanks to Konstantin Hyppönen.)
Changes affecting code
A stack-overrun bug has been fixed in 'mktime' and similar functions.
Changes affecting commentary
Commentary now uses UTF-8 instead of US-ASCII, allowing the use of

View File

@@ -1868,7 +1868,7 @@ time1(struct tm *const tmp,
register int i;
register int nseen;
int seen[TZ_MAX_TYPES];
int types[TZ_MAX_TYPES];
int types[TZ_MAX_TIMES];
int okay;
if (tmp == NULL) {