authd: always use an empty buffer to read ident reply

Otherwise we could read uninitialised data beyond the actual reply
This commit is contained in:
Simon Arlott 2018-08-12 18:45:05 +01:00
parent 15b05f95f0
commit 244f6259de
No known key found for this signature in database
GPG key ID: 49BFFEEFD4C3ED53

View 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;