]> jfr.im git - irc/charybdis-ircd/charybdis.git/commitdiff
authd: always use an empty buffer to read ident reply
authorSimon Arlott <sa.me.uk>
Sun, 12 Aug 2018 17:45:05 +0000 (18:45 +0100)
committerSimon Arlott <sa.me.uk>
Sun, 12 Aug 2018 17:45:05 +0000 (18:45 +0100)
Otherwise we could read uninitialised data beyond the actual reply

authd/providers/ident.c

index 53f1122b5cb80e101b305251a4a9fcb470cefb42..8221a502dcbe3dd41e79c654fb96c01c11dc987c 100644 (file)
@@ -119,7 +119,7 @@ static void
 read_ident_reply(rb_fde_t *F, void *data)
 {
        struct auth_client *auth = data;
-       char buf[IDENT_BUFSIZE + 1];    /* buffer to read auth reply into */
+       char buf[IDENT_BUFSIZE + 1] = { 0 }; /* buffer to read auth reply into */
        ident_message message = REPORT_FAIL;
        char *s = NULL;
        char *t = NULL;