1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

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 commit is contained in:
Jim McDonough -
parent be926c3a1a
commit 47b7a3e0f3

View File

@ -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;