aboutsummaryrefslogtreecommitdiffstats
path: root/gssapi.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2018-04-14 20:38:02 +0200
committerMatthias Andree <matthias.andree@gmx.de>2018-04-14 20:38:02 +0200
commit07f01ce3e566e0c7fd4fa859d759dd70140dcf4e (patch)
treee8f452904144604d6aa660862a2c754b03a62647 /gssapi.c
parenta9b253b3aa0a34696d24b2d85129d8a1f613b483 (diff)
downloadfetchmail-07f01ce3e566e0c7fd4fa859d759dd70140dcf4e.tar.gz
fetchmail-07f01ce3e566e0c7fd4fa859d759dd70140dcf4e.tar.bz2
fetchmail-07f01ce3e566e0c7fd4fa859d759dd70140dcf4e.zip
GSSAPI: Do not add gratuitious NUL byte to username.
Greg Hudson reported this broke Exchange 2013 authentication.
Diffstat (limited to 'gssapi.c')
-rw-r--r--gssapi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gssapi.c b/gssapi.c
index c2c7d94f..31247e3b 100644
--- a/gssapi.c
+++ b/gssapi.c
@@ -269,7 +269,7 @@ cancelfail:
memcpy(buf1, &buf_size, 4);
buf1[0] = GSSAUTH_P_NONE;
strlcpy(buf1+4, username, sizeof(buf1) - 4); /* server decides if princ is user */
- request_buf.length = 4 + strlen(username) + 1;
+ request_buf.length = 4 + strlen(username);
request_buf.value = buf1;
maj_stat = gss_wrap(&min_stat, context, 0, GSS_C_QOP_DEFAULT, &request_buf,
&cflags, &send_token);