aboutsummaryrefslogtreecommitdiffstats
path: root/ntlmsubr.c
diff options
context:
space:
mode:
Diffstat (limited to 'ntlmsubr.c')
-rw-r--r--ntlmsubr.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ntlmsubr.c b/ntlmsubr.c
index f9d27330..9321d26e 100644
--- a/ntlmsubr.c
+++ b/ntlmsubr.c
@@ -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);