summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-10-30 08:55:47 +0100
committerSébastien Helleu <flashcode@flashtux.org>2023-10-30 23:10:54 +0100
commitf8c459453d4fcc705a676b38deccdfa549996e94 (patch)
tree56b214db92923c5dfb85a1d4782149acca0e59b6 /src
parentbd187cd668163a85a8708a58ce6e82bc78f5c88d (diff)
downloadweechat-f8c459453d4fcc705a676b38deccdfa549996e94.zip
core: fix crash when "config_version" is present in a configuration file without a value
Diffstat (limited to 'src')
-rw-r--r--src/core/wee-config-file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/wee-config-file.c b/src/core/wee-config-file.c
index 006dd29a7..83fef3b76 100644
--- a/src/core/wee-config-file.c
+++ b/src/core/wee-config-file.c
@@ -3255,6 +3255,9 @@ config_file_parse_version (const char *version)
long number;
char *error;
+ if (!version)
+ return -1;
+
number = strtoll (version, &error, 10);
if (!error || error[0])
return -1;