diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2011-11-27 10:06:24 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2011-11-27 10:06:24 +0100 |
commit | 8ba8e625800462b060bc9e0cfc73dd05059c1f59 (patch) | |
tree | 9eb281a5e34a84f0f7c2edda43485b815c45d2c7 | |
parent | c40a281ce4b208e8bbf6c6882547208e7b1bfefa (diff) | |
download | weechat-8ba8e625800462b060bc9e0cfc73dd05059c1f59.zip |
irc: fix crash when signon time in message 317 (whois, idle) is invalid (too large) (bug #34905)
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/core/wee-util.c | 11 |
2 files changed, 12 insertions, 3 deletions
@@ -1,7 +1,7 @@ WeeChat ChangeLog ================= Sébastien Helleu <flashcode@flashtux.org> -v0.3.7-dev, 2011-11-25 +v0.3.7-dev, 2011-11-27 Version 0.3.7 (under dev!) @@ -31,6 +31,8 @@ Version 0.3.7 (under dev!) * core: enable background process under Cygwin to connect to servers, fix reconnection problem (bug #34626) * api: add new functions strcasecmp_range, strncasecmp_range and hdata_char +* irc: fix crash when signon time in message 317 (whois, idle) is invalid + (too large) (bug #34905) * irc: do not delete servers added in irc.conf on /reload (bug #34872) * irc: remove autorejoin on channels when disconnected from server (bug #32207) * irc: display messages kick/kill/mode/topic even if nick is ignored diff --git a/src/core/wee-util.c b/src/core/wee-util.c index 40a1b50f3..cf3d9fe38 100644 --- a/src/core/wee-util.c +++ b/src/core/wee-util.c @@ -117,8 +117,15 @@ util_get_time_string (const time_t *date) static char text_time[128]; local_time = localtime (date); - strftime (text_time, sizeof (text_time), - CONFIG_STRING(config_look_time_format), local_time); + if (local_time) + { + strftime (text_time, sizeof (text_time), + CONFIG_STRING(config_look_time_format), local_time); + } + else + { + text_time[0] = '\0'; + } return text_time; } |