Merge pull request #6 from AXDOOMER/master

Fix buffer overflow in LoadDefaultCollection
This commit is contained in:
David Zuber
2020-06-26 10:40:50 +01:00
committed by GitHub
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