core: check that option_name is not NULL in config file functions
This commit is contained in:
parent
3ee2f40fb3
commit
fb57ad147e
@ -835,6 +835,9 @@ config_file_search_option (struct t_config_file *config_file,
|
|||||||
struct t_config_option *ptr_option;
|
struct t_config_option *ptr_option;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
if (!option_name)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if (section)
|
if (section)
|
||||||
{
|
{
|
||||||
for (ptr_option = section->last_option; ptr_option;
|
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;
|
*section_found = NULL;
|
||||||
*option_found = NULL;
|
*option_found = NULL;
|
||||||
|
|
||||||
|
if (!option_name)
|
||||||
|
return;
|
||||||
|
|
||||||
if (section)
|
if (section)
|
||||||
{
|
{
|
||||||
for (ptr_option = section->last_option; ptr_option;
|
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)
|
if (pos_option_name)
|
||||||
*pos_option_name = NULL;
|
*pos_option_name = NULL;
|
||||||
|
|
||||||
|
if (!option_name)
|
||||||
|
return;
|
||||||
|
|
||||||
ptr_config = NULL;
|
ptr_config = NULL;
|
||||||
ptr_section = NULL;
|
ptr_section = NULL;
|
||||||
ptr_option = NULL;
|
ptr_option = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user