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 | |
parent | bd187cd668163a85a8708a58ce6e82bc78f5c88d (diff) | |
download | weechat-f8c459453d4fcc705a676b38deccdfa549996e94.zip |
core: fix crash when "config_version" is present in a configuration file without a value
-rw-r--r-- | ChangeLog.adoc | 1 | ||||
-rw-r--r-- | src/core/wee-config-file.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc index cb646c578..24583c6f0 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -23,6 +23,7 @@ New features:: Bug fixes:: + * core: fix crash when "config_version" is present in a configuration file without a value * core: display an error on startup if environment variable "HOME" is not set * core: fix crash when a custom bar item name is already used by a default bar item (issue #2034) * core: fix random timeouts when a lot of concurrent processes are launched with hook_process (issue #2033) 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; |