diff options
author | dx <dx@dxzone.com.ar> | 2018-03-05 04:26:11 -0300 |
---|---|---|
committer | dx <dx@dxzone.com.ar> | 2018-03-05 04:26:11 -0300 |
commit | a51cac374ab8129db74654af2c7ce0435a1aaf30 (patch) | |
tree | eba907ee68275a05b85588e156b2964f0ef45e81 | |
parent | fc148f2fe97668f951969280066684b9175d8e4b (diff) | |
download | pidgin-a51cac374ab8129db74654af2c7ce0435a1aaf30.tar.gz |
irc: Fix write of a single \0 before the start of a buffer in irc_parse_ctcp
Reported by Joseph Bisch
-rw-r--r-- | libpurple/protocols/irc/parse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpurple/protocols/irc/parse.c b/libpurple/protocols/irc/parse.c index c4caa5e933..8eccab1701 100644 --- a/libpurple/protocols/irc/parse.c +++ b/libpurple/protocols/irc/parse.c @@ -555,7 +555,7 @@ char *irc_parse_ctcp(struct irc_conn *irc, const char *from, const char *to, con * message and low-level quoting ... but if you want that crap, * use a real IRC client. */ - if (msg[0] != '\001' || msg[strlen(msg) - 1] != '\001') + if (msg[0] != '\001' || msg[1] == '\0' || msg[strlen(msg) - 1] != '\001') return g_strdup(msg); if (!strncmp(cur, "ACTION ", 7)) { |