Fix potential buffer overrun

This commit is contained in:
Richard Frith-Macdonald 2018-02-09 08:32:22 +00:00
parent 4aa8ca1e6d
commit c9a1d39055
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2018-02-09 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSTimeZone.m: fix missing fieldwidth specified in fscanf call
2018-02-08 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSPortCoder.h

View file

@ -1869,7 +1869,7 @@ localZoneString, [zone name], sign, s/3600, (s/60)%60);
raise: NSInternalInconsistencyException
format: @"Failed to open time zone regions array file."];
}
while (fscanf(fp, "%d %s", &index, name) == 2)
while (fscanf(fp, "%d %79s", &index, name) == 2)
{
if (index < 0)
index = 0;