From ececf2f6409b5aed0b235bd2b77ad367f6749137 Mon Sep 17 00:00:00 2001 From: Patrick Griffis Date: Sun, 11 Mar 2018 19:08:26 -0400 Subject: Fix fscanf() usage without size limit Closes #2137 --- src/common/plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common') 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 */ -- cgit 1.4.1