git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be926c3
)
Fix length in snprintf invocation to account for "dn:" in sasl gssapi bind.
author
Jim McDonough
<jmcd@samba.org>
Mon, 8 Jul 2002 20:46:54 +0000
(20:46 +0000)
committer
Jim McDonough
<jmcd@samba.org>
Mon, 8 Jul 2002 20:46:54 +0000
(20:46 +0000)
Also remove unused line which incremented pointer by the wrong length anyway.
Provided by Anthony Liguori (aliguori@us.ibm.com).
source/libads/sasl.c
patch
|
blob
|
history
diff --git
a/source/libads/sasl.c
b/source/libads/sasl.c
index eb29c71fce2ebcb5cd2f38bc31e90df0f3d5fbee..1b55453cac9f2d780715a177c26eca74c37983b2 100644
(file)
--- 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;