mirror of
https://github.com/weechat/weechat.git
synced 2026-06-30 06:46:38 +02:00
core, plugins: check that string parameters are not NULL in search functions (issue #1872)
This commit is contained in:
@@ -154,7 +154,7 @@ API_FUNC(register)
|
||||
shutdown_func = lua_tostring (L, -2);
|
||||
charset = lua_tostring (L, -1);
|
||||
|
||||
if (plugin_script_search (weechat_lua_plugin, lua_scripts, name))
|
||||
if (plugin_script_search (lua_scripts, name))
|
||||
{
|
||||
/* another script already exists with same name */
|
||||
weechat_printf (NULL,
|
||||
|
||||
@@ -767,7 +767,7 @@ weechat_lua_unload_name (const char *name)
|
||||
{
|
||||
struct t_plugin_script *ptr_script;
|
||||
|
||||
ptr_script = plugin_script_search (weechat_lua_plugin, lua_scripts, name);
|
||||
ptr_script = plugin_script_search (lua_scripts, name);
|
||||
if (ptr_script)
|
||||
{
|
||||
weechat_lua_unload (ptr_script);
|
||||
@@ -796,7 +796,7 @@ weechat_lua_reload_name (const char *name)
|
||||
struct t_plugin_script *ptr_script;
|
||||
char *filename;
|
||||
|
||||
ptr_script = plugin_script_search (weechat_lua_plugin, lua_scripts, name);
|
||||
ptr_script = plugin_script_search (lua_scripts, name);
|
||||
if (ptr_script)
|
||||
{
|
||||
filename = strdup (ptr_script->filename);
|
||||
|
||||
Reference in New Issue
Block a user