projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df35f70
)
No need to sprintf "%s"
author
Alan T. DeKok
<aland@freeradius.org>
Tue, 22 Nov 2011 13:39:38 +0000
(14:39 +0100)
committer
Alan T. DeKok
<aland@freeradius.org>
Tue, 22 Nov 2011 13:39:38 +0000
(14:39 +0100)
Use strlcpy instead
src/modules/rlm_ldap/rlm_ldap.c
patch
|
blob
|
history
diff --git
a/src/modules/rlm_ldap/rlm_ldap.c
b/src/modules/rlm_ldap/rlm_ldap.c
index
5c1f4ab
..
3caa97c
100644
(file)
--- a/
src/modules/rlm_ldap/rlm_ldap.c
+++ b/
src/modules/rlm_ldap/rlm_ldap.c
@@
-1076,8
+1076,8
@@
static int ldap_groupcmp(void *instance, REQUEST *req,
if (strchr((char *)check->vp_strvalue,',') != NULL) {
/* This looks like a DN */
- s
nprintf(filter,sizeof(filter), "%s",gr_filter
);
- s
nprintf(basedn,sizeof(basedn), "%s",(char *)check->vp_strvalue
);
+ s
trlcpy(filter, gr_filter, sizeof(filter)
);
+ s
trlcpy(basedn, check->vp_strvalue, sizeof(basedn)
);
} else
snprintf(filter,sizeof(filter), "(&(%s=%s)%s)",
inst->groupname_attr,