ref: 029a2f98f2e5c811efcb8e6838954bed941304c9
parent: a6e8c537f7005cadda33aebfeb4ca6bd3a31b9b7
author: Ori Bernstein <ori@eigenstate.org>
date: Sat Jan 23 13:02:46 EST 2021
upas/fs: fix swapped argument, dead code With ntlm auth, we were trying to set 0 bytes of the auth struct to its size. The args were clearly swapped. Fix it. While we're here, remove some dead code.
--- a/sys/src/cmd/upas/fs/imap.c
+++ b/sys/src/cmd/upas/fs/imap.c
@@ -687,8 +687,7 @@
return "auth_respond failed";
/* prepare NtLmAuthenticate blob */
-
- memset(buf, sizeof buf, 0);
+ memset(buf, 0, sizeof(buf));
p = buf;
ep = p + 8 + 6*8 + 2*4;
q = ep;
@@ -850,14 +849,6 @@
return err;
}
return nil;
-}
-
-static void
-imap4hangup(Imap *imap)
-{
- imap4cmd(imap, "logout");
- imap4resp(imap);
- imap4disconnect(imap);
}
/* gmail lies about message sizes */
--
⑨