diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-03-22 21:03:59 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-03-23 03:39:35 +0100 |
commit | d73db405f71002deaddeea68adb747ef1984945c (patch) | |
tree | 0465e3a6936f1900886046ab55cf5fd63dcc0c0f /source3/smbd | |
parent | 1d22c3919d08b4d18a1d021a407a98cb1402d7d7 (diff) | |
download | samba-d73db405f71002deaddeea68adb747ef1984945c.tar.gz samba-d73db405f71002deaddeea68adb747ef1984945c.tar.bz2 samba-d73db405f71002deaddeea68adb747ef1984945c.zip |
s3-safe_string: Add checked_strlcpy()
This is strlcpy, just with an extra check of the parameters with
sizeof(), use only where that works.
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Mar 23 03:39:35 CET 2011 on sn-devel-104
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/negprot.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c index eb6dfa35a9..f128396173 100644 --- a/source3/smbd/negprot.c +++ b/source3/smbd/negprot.c @@ -238,7 +238,7 @@ DATA_BLOB negprot_spnego(TALLOC_CTX *ctx, struct smbd_server_connection *sconn) memset(blob_out.data, '\0', 16); - safe_strcpy(unix_name, global_myname(), sizeof(unix_name)-1); + checked_strlcpy(unix_name, global_myname(), sizeof(unix_name)); strlower_m(unix_name); push_ascii_nstring(dos_name, unix_name); safe_strcpy((char *)blob_out.data, dos_name, 16); |