From 83060558c98051fd96ed831e22e218497ba5dfd7 Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Mon, 8 Jul 2002 20:46:54 +0000 Subject: [PATCH] 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) --- source3/libads/sasl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source3/libads/sasl.c b/source3/libads/sasl.c index eb29c71fce2..1b55453cac9 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; -- 2.11.4.GIT