Fix fscanf() usage without size limit

Closes #2137
This commit is contained in:
Patrick Griffis 2018-03-11 19:08:26 -04:00
parent d72249d91f
commit ececf2f640
1 changed files with 1 additions and 1 deletions

View File

@ -2010,7 +2010,7 @@ hexchat_pluginpref_list (hexchat_plugin *pl, char* dest)
else /* existing config file, get list of settings */
{
strcpy (dest, ""); /* clean up garbage */
while (fscanf (fpIn, " %[^\n]", bufp) != EOF) /* read whole lines including whitespaces */
while (fscanf (fpIn, " %511[^\n]", bufp) != EOF) /* read whole lines including whitespaces */
{
token = strtok (buffer, "=");
g_strlcat (dest, g_strchomp (token), 4096); /* Dest must not be smaller than this */