diff options
author | Nei <ailin.nemui@gmail.com> | 2017-10-20 13:16:27 +0000 |
---|---|---|
committer | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2017-10-20 15:22:32 +0200 |
commit | c46bed1e17185d4a20a0f382cf5253bf91829543 (patch) | |
tree | 3f0c0551e7936b79a6462800e96f372ce6fd9b46 /src/irc | |
parent | 3c2ae68073de310063e43408e46f8d67cbc9aabd (diff) | |
parent | 0840eaec7bf56740029aae614e393f8cf76f6946 (diff) | |
download | irssi-c46bed1e17185d4a20a0f382cf5253bf91829543.zip |
Merge branch 'fix-gl-15' into 'security'
Don't proceed with cmd_msg if there was an error splitting msg
See merge request irssi/irssi!21
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/core/irc-servers.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c index 3117e345..4eaab712 100644 --- a/src/irc/core/irc-servers.c +++ b/src/irc/core/irc-servers.c @@ -116,11 +116,14 @@ static char **split_line(const SERVER_REC *server, const char *line, * the code much simpler. It's worth it. */ len -= strlen(recoded_start) + strlen(recoded_end); + g_warn_if_fail(len > 0); if (len <= 0) { /* There is no room for anything. */ g_free(recoded_start); g_free(recoded_end); - return NULL; + lines = g_new(char *, 1); + lines[0] = NULL; + return lines; } lines = recode_split(server, line, target, len, onspace); |