mirror of
https://github.com/weechat/weechat.git
synced 2026-06-25 04:16:38 +02:00
core, plugins: check that string parameters are not NULL in search functions (issue #1872)
This commit is contained in:
@@ -115,7 +115,7 @@ API_FUNC(register)
|
||||
&license, &description, &shutdown_func, &charset))
|
||||
API_WRONG_ARGS(API_RETURN_ERROR);
|
||||
|
||||
if (plugin_script_search (weechat_python_plugin, python_scripts, name))
|
||||
if (plugin_script_search (python_scripts, name))
|
||||
{
|
||||
/* another script already exists with same name */
|
||||
weechat_printf (NULL,
|
||||
|
||||
@@ -993,7 +993,7 @@ weechat_python_unload_name (const char *name)
|
||||
{
|
||||
struct t_plugin_script *ptr_script;
|
||||
|
||||
ptr_script = plugin_script_search (weechat_python_plugin, python_scripts, name);
|
||||
ptr_script = plugin_script_search (python_scripts, name);
|
||||
if (ptr_script)
|
||||
{
|
||||
weechat_python_unload (ptr_script);
|
||||
@@ -1035,7 +1035,7 @@ weechat_python_reload_name (const char *name)
|
||||
struct t_plugin_script *ptr_script;
|
||||
char *filename;
|
||||
|
||||
ptr_script = plugin_script_search (weechat_python_plugin, python_scripts, name);
|
||||
ptr_script = plugin_script_search (python_scripts, name);
|
||||
if (ptr_script)
|
||||
{
|
||||
filename = strdup (ptr_script->filename);
|
||||
|
||||
Reference in New Issue
Block a user