Fix buffer overflow in LoadDefaultCollection

CVE-2020-15007: https://nvd.nist.gov/vuln/detail/CVE-2020-15007
This commit is contained in:
Alexandre-Xavier Labonté-Lamoureux
2020-06-25 23:25:43 -04:00
parent 8de7d5deea
commit eb956f8a36
2 changed files with 2 additions and 2 deletions

View File

@ -512,7 +512,7 @@ static void LoadDefaultCollection(default_collection_t *collection)
while (!feof(f)) while (!feof(f))
{ {
if (fscanf (f, "%79s %[^\n]\n", defname, strparm) != 2) if (fscanf (f, "%79s %99[^\n]\n", defname, strparm) != 2)
{ {
// This line doesn't match // This line doesn't match

View File

@ -1312,7 +1312,7 @@ static void LoadDefaultCollection(default_collection_t *collection)
while (!feof(f)) while (!feof(f))
{ {
if (fscanf (f, "%79s %[^\n]\n", defname, strparm) != 2) if (fscanf (f, "%79s %99[^\n]\n", defname, strparm) != 2)
{ {
// This line doesn't match // This line doesn't match