diff options
author | Rich Megginson <rmeggins@redhat.com> | 2005-03-11 03:47:36 +0000 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2005-03-11 03:47:36 +0000 |
commit | 9667f84c94b16d51743bea68df24aeee57bf6f82 (patch) | |
tree | 3e4ac798dc26f0fb3c7883c88d83c5e254f08384 /ldap/servers/slapd/saslbind.c | |
parent | 5a9fd42bc4bfc2ca4a4fad2f10881ea16cf504ea (diff) | |
download | ds-9667f84c94b16d51743bea68df24aeee57bf6f82.tar.gz ds-9667f84c94b16d51743bea68df24aeee57bf6f82.tar.xz ds-9667f84c94b16d51743bea68df24aeee57bf6f82.zip |
This one is mostly strcpy/strcat checking, checking for null strings before strlen, removing some dead code, other odds and ends.
Diffstat (limited to 'ldap/servers/slapd/saslbind.c')
-rw-r--r-- | ldap/servers/slapd/saslbind.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ldap/servers/slapd/saslbind.c b/ldap/servers/slapd/saslbind.c index 1a6c2f14..c68b61a4 100644 --- a/ldap/servers/slapd/saslbind.c +++ b/ldap/servers/slapd/saslbind.c @@ -422,7 +422,7 @@ static int ids_sasl_canon_user( } /* TODO: canonicalize */ - strcpy(out_user, dn); + PL_strncpyz(out_user, dn, out_umax); #ifdef CYRUS_SASL /* the length of out_user needs to be set for Cyrus SASL */ *out_ulen = strlen(out_user); @@ -433,7 +433,7 @@ static int ids_sasl_canon_user( /* The authid can start with dn:. In such case remove it */ if (strncasecmp(authid,"dn:",3) == 0 ) offset = 3; - strcpy(out_authid, authid+offset); + PL_strncpyz(out_authid, authid+offset, out_amax); } *out_ulen = -1; *out_alen = -1; |