1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

core: check that option_name is not NULL in config file functions

This commit is contained in:
Sébastien Helleu
2021-09-27 22:02:22 +02:00
parent 3ee2f40fb3
commit fb57ad147e
+9
View File
@@ -835,6 +835,9 @@ config_file_search_option (struct t_config_file *config_file,
struct t_config_option *ptr_option;
int rc;
if (!option_name)
return NULL;
if (section)
{
for (ptr_option = section->last_option; ptr_option;
@@ -889,6 +892,9 @@ config_file_search_section_option (struct t_config_file *config_file,
*section_found = NULL;
*option_found = NULL;
if (!option_name)
return;
if (section)
{
for (ptr_option = section->last_option; ptr_option;
@@ -953,6 +959,9 @@ config_file_search_with_string (const char *option_name,
if (pos_option_name)
*pos_option_name = NULL;
if (!option_name)
return;
ptr_config = NULL;
ptr_section = NULL;
ptr_option = NULL;