diff options
author | TingPing <tingping@tingping.se> | 2015-04-07 06:38:59 -0400 |
---|---|---|
committer | TingPing <tingping@tingping.se> | 2015-04-07 06:38:59 -0400 |
commit | c86389f99b17bb5bdc40a92f54f85f5c2ef2b2d6 (patch) | |
tree | a53e21f4eb2e31ba10d0afcefba5b08659d1c907 | |
parent | 66f2f3a84a156f063dfc7540e9d203792f3de943 (diff) |
Fix possible overflow in pluginpref
Closes #1265
-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 8d990dc9..a397c878 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -1821,7 +1821,7 @@ hexchat_pluginpref_set_str_real (hexchat_plugin *pl, const char *var, const char { prevSetting = 0; - while (fscanf (fpIn, " %[^\n]", line_bufp) != EOF) /* read whole lines including whitespaces */ + while (fscanf (fpIn, " %511[^\n]", line_bufp) != EOF) /* read whole lines including whitespaces */ { buffer_tmp = g_strdup_printf ("%s ", var); /* add one space, this way it works against var - var2 checks too */ |