Fix possible overflow in pluginpref

Closes #1265
This commit is contained in:
TingPing 2015-04-07 06:38:59 -04:00
parent 66f2f3a84a
commit c86389f99b
1 changed files with 1 additions and 1 deletions

View File

@ -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 */