diff options
Diffstat (limited to 'imap.c')
-rw-r--r-- | imap.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -261,7 +261,14 @@ static int do_rfc1731(int sock, char *truename) return result; } - /* this patch by Dan Root <dar@thekeep.org> solves an endianess problem. */ + len = from64tobits(challenge1.cstr, buf1); + if (len < 0) { + report(stderr, _("could not decode initial BASE64 challenge\n")); + return PS_AUTHFAIL; + } + + /* this patch by Dan Root <dar@thekeep.org> solves an endianess + * problem. */ { char tmp[4]; @@ -269,12 +276,6 @@ static int do_rfc1731(int sock, char *truename) memcpy(challenge1.cstr, tmp, sizeof(tmp)); } - len = from64tobits(challenge1.cstr, buf1); - if (len < 0) { - report(stderr, _("could not decode initial BASE64 challenge\n")); - return PS_AUTHFAIL; - } - /* Client responds with a Kerberos ticket and an authenticator for * the principal "imap.hostname@realm" where "hostname" is the * first component of the host name of the server with all letters |