From 9548a4cf747c54aac641544049a24fb1f270c14f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Mon, 27 Sep 2021 23:23:01 +0200 Subject: [PATCH] core: check that option is not NULL in function config_file_option_value_to_string --- src/core/wee-config-file.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/wee-config-file.c b/src/core/wee-config-file.c index 014e06d71..de57a97d6 100644 --- a/src/core/wee-config-file.c +++ b/src/core/wee-config-file.c @@ -1748,6 +1748,9 @@ config_file_option_value_to_string (struct t_config_option *option, const char *ptr_value; int enabled, length; + if (!option) + return NULL; + if ((default_value && !option->default_value) || (!default_value && !option->value)) {