diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2021-09-27 22:02:22 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2021-09-27 22:02:22 +0200 |
commit | fb57ad147ea8458e3a9b289bbd7c2ec6c9b232db (patch) | |
tree | 1f9dd33f86d791aacede590ea1b8a2e5ebb066c4 /src/core/wee-config-file.c | |
parent | 3ee2f40fb38c5eb25c58a27694a702a049a2a73f (diff) | |
download | weechat-fb57ad147ea8458e3a9b289bbd7c2ec6c9b232db.zip |
core: check that option_name is not NULL in config file functions
Diffstat (limited to 'src/core/wee-config-file.c')
-rw-r--r-- | src/core/wee-config-file.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/wee-config-file.c b/src/core/wee-config-file.c index 941df4795..8bc734697 100644 --- a/src/core/wee-config-file.c +++ b/src/core/wee-config-file.c @@ -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; |