diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-10-30 08:55:47 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-10-30 23:10:54 +0100 |
commit | f8c459453d4fcc705a676b38deccdfa549996e94 (patch) | |
tree | 56b214db92923c5dfb85a1d4782149acca0e59b6 /src | |
parent | bd187cd668163a85a8708a58ce6e82bc78f5c88d (diff) | |
download | weechat-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.c | 3 |
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; |