mirror of
https://github.com/weechat/weechat.git
synced 2026-07-02 15:53:12 +02:00
core, plugins: check that string parameters are not NULL in search functions (issue #1872)
This commit is contained in:
@@ -128,7 +128,7 @@ API_FUNC(register)
|
||||
php_current_script = NULL;
|
||||
php_registered_script = NULL;
|
||||
|
||||
if (plugin_script_search (weechat_php_plugin, php_scripts, ZSTR_VAL(name)))
|
||||
if (plugin_script_search (php_scripts, ZSTR_VAL(name)))
|
||||
{
|
||||
/* another script already exists with same name */
|
||||
weechat_printf (NULL,
|
||||
|
||||
@@ -805,7 +805,7 @@ weechat_php_unload_name (const char *name)
|
||||
{
|
||||
struct t_plugin_script *ptr_script;
|
||||
|
||||
ptr_script = plugin_script_search (weechat_php_plugin, php_scripts, name);
|
||||
ptr_script = plugin_script_search (php_scripts, name);
|
||||
if (ptr_script)
|
||||
{
|
||||
weechat_php_unload (ptr_script);
|
||||
@@ -847,7 +847,7 @@ weechat_php_reload_name (const char *name)
|
||||
struct t_plugin_script *ptr_script;
|
||||
char *filename;
|
||||
|
||||
ptr_script = plugin_script_search (weechat_php_plugin, php_scripts, name);
|
||||
ptr_script = plugin_script_search (php_scripts, name);
|
||||
if (ptr_script)
|
||||
{
|
||||
filename = strdup (ptr_script->filename);
|
||||
|
||||
Reference in New Issue
Block a user