diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2016-04-08 23:02:30 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-04-13 15:28:09 -0700 |
commit | eb94ee7f0f38cd24270bfb2f655cdec214a4d6e0 (patch) | |
tree | a7dc97cf21f471dd34cc52a7ce9cbfe9668f74eb /imap-send.c | |
parent | 6c50a575952fcffa0df0cb435e9e3f4eab74b1bf (diff) | |
download | git-eb94ee7f0f38cd24270bfb2f655cdec214a4d6e0.tar.gz |
imap-send: fix CRAM-MD5 response calculationky/imap-send
Remove extra + 1 from resp_len, the length of the byte sequence to be
Base64 encoded and passed to the server as the response. Or the response
incorrectly contains an extra \0.
Signed-off-by: Kazuki Yamaguchi <k@rhe.jp>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'imap-send.c')
-rw-r--r-- | imap-send.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/imap-send.c b/imap-send.c index 30979f0c63..407e46bc8c 100644 --- a/imap-send.c +++ b/imap-send.c @@ -890,7 +890,7 @@ static char *cram(const char *challenge_64, const char *user, const char *pass) /* response: "<user> <digest in hex>" */ response = xstrfmt("%s %s", user, hex); - resp_len = strlen(response) + 1; + resp_len = strlen(response); response_64 = xmallocz(ENCODED_SIZE(resp_len)); encoded_len = EVP_EncodeBlock((unsigned char *)response_64, |