diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-01-27 20:47:24 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-01-28 15:14:22 +0100 |
commit | c07cf691adb4740759e9fd128a2f6702c912d70f (patch) | |
tree | 91520d9be1270aae41d23ffeae1f69d3a31b10d2 /src/plugins/perl | |
parent | c9ac4fef4b7aa054df72bddf667edea0608d39c6 (diff) | |
download | weechat-c07cf691adb4740759e9fd128a2f6702c912d70f.zip |
core, plugins: check that string parameters are not NULL in search functions (issue #1872)
Diffstat (limited to 'src/plugins/perl')
-rw-r--r-- | src/plugins/perl/weechat-perl-api.c | 2 | ||||
-rw-r--r-- | src/plugins/perl/weechat-perl.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/perl/weechat-perl-api.c b/src/plugins/perl/weechat-perl-api.c index b06d20953..b8b0dac13 100644 --- a/src/plugins/perl/weechat-perl-api.c +++ b/src/plugins/perl/weechat-perl-api.c @@ -133,7 +133,7 @@ API_FUNC(register) shutdown_func = SvPV_nolen (ST (5)); charset = SvPV_nolen (ST (6)); - if (plugin_script_search (weechat_perl_plugin, perl_scripts, name)) + if (plugin_script_search (perl_scripts, name)) { /* another script already exists with same name */ weechat_printf (NULL, diff --git a/src/plugins/perl/weechat-perl.c b/src/plugins/perl/weechat-perl.c index 74375e347..bfad79d61 100644 --- a/src/plugins/perl/weechat-perl.c +++ b/src/plugins/perl/weechat-perl.c @@ -750,7 +750,7 @@ weechat_perl_unload_name (const char *name) { struct t_plugin_script *ptr_script; - ptr_script = plugin_script_search (weechat_perl_plugin, perl_scripts, name); + ptr_script = plugin_script_search (perl_scripts, name); if (ptr_script) { weechat_perl_unload (ptr_script); @@ -792,7 +792,7 @@ weechat_perl_reload_name (const char *name) struct t_plugin_script *ptr_script; char *filename; - ptr_script = plugin_script_search (weechat_perl_plugin, perl_scripts, name); + ptr_script = plugin_script_search (perl_scripts, name); if (ptr_script) { filename = strdup (ptr_script->filename); |