summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/passdb/passdb.c6
-rw-r--r--source3/smbd/mangle_hash.c8
-rw-r--r--source3/smbd/mangle_hash2.c2
-rw-r--r--source3/smbd/trans2.c2
4 files changed, 9 insertions, 9 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index 62af5be7eb..a2fc12ae4b 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -384,9 +384,9 @@ void pdb_sethexpwd(char p[33], const unsigned char *pwd, uint32_t acct_ctrl)
slprintf(&p[i*2], 3, "%02X", pwd[i]);
} else {
if (acct_ctrl & ACB_PWNOTREQ)
- safe_strcpy(p, "NO PASSWORDXXXXXXXXXXXXXXXXXXXXX", 32);
+ strlcpy(p, "NO PASSWORDXXXXXXXXXXXXXXXXXXXXX", 33);
else
- safe_strcpy(p, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", 32);
+ strlcpy(p, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", 33);
}
}
@@ -435,7 +435,7 @@ void pdb_sethexhours(char *p, const unsigned char *hours)
slprintf(&p[i*2], 3, "%02X", hours[i]);
}
} else {
- safe_strcpy(p, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", 43);
+ strlcpy(p, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", 44);
}
}
diff --git a/source3/smbd/mangle_hash.c b/source3/smbd/mangle_hash.c
index d98b350a37..0451809cac 100644
--- a/source3/smbd/mangle_hash.c
+++ b/source3/smbd/mangle_hash.c
@@ -473,7 +473,7 @@ static void cache_mangled_name( const char mangled_name[13],
return;
/* Init the string lengths. */
- safe_strcpy(mangled_name_key, mangled_name, sizeof(mangled_name_key)-1);
+ strlcpy(mangled_name_key, mangled_name, sizeof(mangled_name_key));
/* See if the extensions are unmangled. If so, store the entry
* without the extension, thus creating a "group" reverse map.
@@ -638,7 +638,7 @@ static bool to_8_3(char magic_char, const char *in, char out[13], int default_ca
if( p ) {
if( p == s )
- safe_strcpy( extension, "___", 3 );
+ strlcpy( extension, "___", 4);
else {
*p++ = 0;
while( *p && extlen < 3 ) {
@@ -670,7 +670,7 @@ static bool to_8_3(char magic_char, const char *in, char out[13], int default_ca
if( *extension ) {
out[baselen+3] = '.';
- safe_strcpy(&out[baselen+4], extension, 3);
+ strlcpy(&out[baselen+4], extension, 4);
}
SAFE_FREE(s);
@@ -738,7 +738,7 @@ static bool hash_name_to_8_3(const char *in,
if (NT_STATUS_IS_OK(is_valid_name(in_ucs2, False, False)) &&
NT_STATUS_IS_OK(is_8_3_w(in_ucs2, False))) {
TALLOC_FREE(in_ucs2);
- safe_strcpy(out, in, 12);
+ strlcpy(out, in, 13);
return True;
}
diff --git a/source3/smbd/mangle_hash2.c b/source3/smbd/mangle_hash2.c
index a39bb895c2..4de80cbe31 100644
--- a/source3/smbd/mangle_hash2.c
+++ b/source3/smbd/mangle_hash2.c
@@ -705,7 +705,7 @@ static bool hash2_name_to_8_3(const char *name,
/* if the name is already a valid 8.3 name then we don't need to
* change anything */
if (is_legal_name(name) && is_8_3(name, False, False, p)) {
- safe_strcpy(new_name, name, 12);
+ strlcpy(new_name, name, 13);
return True;
}
}
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index aee4e8865c..39e653afae 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -491,7 +491,7 @@ static void canonicalize_ea_name(connection_struct *conn, files_struct *fsp, con
if (strequal(&unix_ea_name[5], ea_list->ea.name)) {
DEBUG(10,("canonicalize_ea_name: %s -> %s\n",
&unix_ea_name[5], ea_list->ea.name));
- safe_strcpy(&unix_ea_name[5], ea_list->ea.name, sizeof(fstring)-6);
+ strlcpy(&unix_ea_name[5], ea_list->ea.name, sizeof(fstring)-5);
break;
}
}