From c4e61db186c2e0916e43a1ffc85afe5997aaf345 Mon Sep 17 00:00:00 2001 From: dequis Date: Thu, 8 Oct 2015 07:25:37 -0300 Subject: irc_sasl_plain_parse: fix size of the parts array Oddly enough it doesn't break. Maybe it overwrites the 'decoded' pointer when it doesn't need it anymore? Fun stuff. Also the version of gcc (5.2) i'm using doesn't complain about array bounds, clang does, and the older gcc (4.6) in travis does too. --- irc_commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'irc_commands.c') diff --git a/irc_commands.c b/irc_commands.c index 4e2a2c64..694fe35c 100644 --- a/irc_commands.c +++ b/irc_commands.c @@ -62,7 +62,7 @@ static gboolean irc_sasl_plain_parse(char *input, char **user, char **pass) { int i, part, len; guint8 *decoded; - char *parts[2]; + char *parts[3]; /* bitlbee's base64_decode wrapper adds an extra null terminator at the end */ len = base64_decode(input, &decoded); -- cgit v1.2.3