diff options
author | Patrick Griffis <tingping@tingping.se> | 2018-03-11 19:08:26 -0400 |
---|---|---|
committer | Patrick Griffis <tingping@tingping.se> | 2018-03-11 19:08:26 -0400 |
commit | ececf2f6409b5aed0b235bd2b77ad367f6749137 (patch) | |
tree | 30435497610e4c08803f571e3bde588cc8a5222f /src/common | |
parent | d72249d91f97e609e755e57f50db30d7a3fc8a06 (diff) |
Fix fscanf() usage without size limit
Closes #2137
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/plugin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/plugin.c b/src/common/plugin.c index b99c4403..3ad3c558 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -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 */ |