diff options
author | Jim McDonough <jmcd@samba.org> | 2002-07-08 20:46:54 +0000 |
---|---|---|
committer | Jim McDonough <jmcd@samba.org> | 2002-07-08 20:46:54 +0000 |
commit | 47b7a3e0f3d101a3bcffd33db6ef4c0672b57ae0 (patch) | |
tree | a9dcaff83e52e0d691e587fa42fcbce3a43088f7 /source/libads | |
parent | be926c3a1a7fc79af62dd1830c56e9503f89f9dd (diff) | |
download | samba-47b7a3e0f3d101a3bcffd33db6ef4c0672b57ae0.tar.gz samba-47b7a3e0f3d101a3bcffd33db6ef4c0672b57ae0.tar.xz samba-47b7a3e0f3d101a3bcffd33db6ef4c0672b57ae0.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).
Diffstat (limited to 'source/libads')
-rw-r--r-- | source/libads/sasl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/libads/sasl.c b/source/libads/sasl.c index eb29c71fce2..1b55453cac9 100644 --- a/source/libads/sasl.c +++ b/source/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; |