diff options
Diffstat (limited to 'ntlmsubr.c')
-rw-r--r-- | ntlmsubr.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -55,7 +55,14 @@ int ntlm_helper(int sock, struct query *ctl, const char *proto) if ((result = gen_recv(sock, msgbuf, sizeof msgbuf))) goto cancelfail; - (void)from64tobits (&challenge, msgbuf, sizeof(challenge)); + if ((result = from64tobits (&challenge, msgbuf, sizeof(challenge))) < 0) + { + report (stderr, GT_("could not decode BASE64 challenge\n")); + /* We do not goto cancelfail; the server has already sent the + * tagged reply, so the protocol exchange has ended, no need + * for us to send the asterisk. */ + return PS_AUTHFAIL; + } if (outlevel >= O_DEBUG) dumpSmbNtlmAuthChallenge(stdout, &challenge); |