pidgin/pidgin

Parents cda0ef7d24fb
Children 5dbbf94443ee
irc: Fix write of a single \0 before the start of a buffer in irc_parse_ctcp

Reported by Joseph Bisch
--- a/libpurple/protocols/irc/parse.c Thu Mar 01 20:38:21 2018 -0600
+++ b/libpurple/protocols/irc/parse.c Mon Mar 05 04:26:11 2018 -0300
@@ -555,7 +555,7 @@
* 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)) {