summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2002-07-08 20:46:54 +0000
committerJim McDonough <jmcd@samba.org>2002-07-08 20:46:54 +0000
commit83060558c98051fd96ed831e22e218497ba5dfd7 (patch)
tree98c21e332fe2b94569349321295a1fad1ec1591f
parent18742edd2acc4848bacf2af6008bf9fea5f82f6b (diff)
downloadsamba-83060558c98051fd96ed831e22e218497ba5dfd7.tar.gz
samba-83060558c98051fd96ed831e22e218497ba5dfd7.tar.bz2
samba-83060558c98051fd96ed831e22e218497ba5dfd7.zip
Fix length in snprintf invocation to account for "dn:" in sasl gssapi bind.
Also remove unused line which incremented pointer by the wrong length anyway. Provided by Anthony Liguori (aliguori@us.ibm.com). (This used to be commit 47b7a3e0f3d101a3bcffd33db6ef4c0672b57ae0)
-rw-r--r--source3/libads/sasl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source3/libads/sasl.c b/source3/libads/sasl.c
index eb29c71fce..1b55453cac 100644
--- a/source3/libads/sasl.c
+++ b/source3/libads/sasl.c
@@ -171,8 +171,7 @@ ADS_STATUS ads_sasl_gssapi_bind(ADS_STRUCT *ads)
*p++ = max_msg_size>>16;
*p++ = max_msg_size>>8;
*p++ = max_msg_size;
- snprintf(p, strlen(ads->bind_path)+1, "dn:%s", ads->bind_path);
- p += strlen(ads->bind_path);
+ snprintf(p, strlen(ads->bind_path)+4, "dn:%s", ads->bind_path);
output_token.length = strlen(ads->bind_path) + 8;