Skip to content
Permalink
Browse files

Fixed infobar_printf interface function, security problem with string…

… format
  • Loading branch information...
flashcode committed Jan 8, 2006
1 parent 05456cc commit dd39ac243273052609e5f3ee6a5217f07e06402d
@@ -328,6 +328,7 @@ static XS (XS_weechat_print_infobar)

perl_plugin->infobar_printf (perl_plugin,
SvIV (ST (0)),
"%s",
SvPV (ST (1), integer));

XSRETURN_YES;
@@ -242,7 +242,7 @@ weechat_python_print_infobar (PyObject *self, PyObject *args)
return Py_BuildValue ("i", 0);
}

python_plugin->infobar_printf (python_plugin, delay, message);
python_plugin->infobar_printf (python_plugin, delay, "%s", message);

return Py_BuildValue ("i", 1);
}
@@ -330,7 +330,7 @@ weechat_ruby_print_infobar (VALUE class, VALUE delay, VALUE message)
c_delay = FIX2INT (delay);
c_message = STR2CSTR (message);

ruby_plugin->infobar_printf (ruby_plugin, c_delay, c_message);
ruby_plugin->infobar_printf (ruby_plugin, c_delay, "%s", c_message);

return INT2FIX (1);
}
@@ -328,6 +328,7 @@ static XS (XS_weechat_print_infobar)

perl_plugin->infobar_printf (perl_plugin,
SvIV (ST (0)),
"%s",
SvPV (ST (1), integer));

XSRETURN_YES;
@@ -242,7 +242,7 @@ weechat_python_print_infobar (PyObject *self, PyObject *args)
return Py_BuildValue ("i", 0);
}

python_plugin->infobar_printf (python_plugin, delay, message);
python_plugin->infobar_printf (python_plugin, delay, "%s", message);

return Py_BuildValue ("i", 1);
}
@@ -330,7 +330,7 @@ weechat_ruby_print_infobar (VALUE class, VALUE delay, VALUE message)
c_delay = FIX2INT (delay);
c_message = STR2CSTR (message);

ruby_plugin->infobar_printf (ruby_plugin, c_delay, c_message);
ruby_plugin->infobar_printf (ruby_plugin, c_delay, "%s", c_message);

return INT2FIX (1);
}

0 comments on commit dd39ac2

Please sign in to comment.
You can’t perform that action at this time.