summaryrefslogtreecommitdiff
path: root/lib/util/tests/str.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-06-24 16:26:23 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-06-24 16:26:23 +1000
commit6da26870e0ae5acd6ff49a30ec2f6886b44d095e (patch)
tree850c71039563c16a5d563c47e7ba2ab645baf198 /lib/util/tests/str.c
parent6925a799d04c6fa59dd2ddef1f5510f9bb7d17d1 (diff)
parent2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 (diff)
downloadsamba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.gz
samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.bz2
samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.zip
Merge 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 as Samba-4.0alpha16
Diffstat (limited to 'lib/util/tests/str.c')
-rw-r--r--lib/util/tests/str.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/util/tests/str.c b/lib/util/tests/str.c
index 6b38feaf43..f9f3abf731 100644
--- a/lib/util/tests/str.c
+++ b/lib/util/tests/str.c
@@ -25,7 +25,7 @@
static bool test_string_sub_simple(struct torture_context *tctx)
{
char tmp[100];
- safe_strcpy(tmp, "foobar", sizeof(tmp));
+ strlcpy(tmp, "foobar", sizeof(tmp));
string_sub(tmp, "foo", "bar", sizeof(tmp));
torture_assert_str_equal(tctx, tmp, "barbar", "invalid sub");
return true;
@@ -34,7 +34,7 @@ static bool test_string_sub_simple(struct torture_context *tctx)
static bool test_string_sub_multiple(struct torture_context *tctx)
{
char tmp[100];
- safe_strcpy(tmp, "fooblafoo", sizeof(tmp));
+ strlcpy(tmp, "fooblafoo", sizeof(tmp));
string_sub(tmp, "foo", "bar", sizeof(tmp));
torture_assert_str_equal(tctx, tmp, "barblabar", "invalid sub");
return true;
@@ -43,7 +43,7 @@ static bool test_string_sub_multiple(struct torture_context *tctx)
static bool test_string_sub_longer(struct torture_context *tctx)
{
char tmp[100];
- safe_strcpy(tmp, "foobla", sizeof(tmp));
+ strlcpy(tmp, "foobla", sizeof(tmp));
string_sub(tmp, "foo", "blie", sizeof(tmp));
torture_assert_str_equal(tctx, tmp, "bliebla", "invalid sub");
return true;
@@ -52,7 +52,7 @@ static bool test_string_sub_longer(struct torture_context *tctx)
static bool test_string_sub_shorter(struct torture_context *tctx)
{
char tmp[100];
- safe_strcpy(tmp, "foobla", sizeof(tmp));
+ strlcpy(tmp, "foobla", sizeof(tmp));
string_sub(tmp, "foo", "bl", sizeof(tmp));
torture_assert_str_equal(tctx, tmp, "blbla", "invalid sub");
return true;
@@ -61,7 +61,7 @@ static bool test_string_sub_shorter(struct torture_context *tctx)
static bool test_string_sub_special_char(struct torture_context *tctx)
{
char tmp[100];
- safe_strcpy(tmp, "foobla", sizeof(tmp));
+ strlcpy(tmp, "foobla", sizeof(tmp));
string_sub(tmp, "foo", "%b;l", sizeof(tmp));
torture_assert_str_equal(tctx, tmp, "_b_lbla", "invalid sub");
return true;