diff options
Diffstat (limited to 'source3/torture')
-rw-r--r-- | source3/torture/mangle_test.c | 2 | ||||
-rw-r--r-- | source3/torture/nsstest.c | 4 | ||||
-rw-r--r-- | source3/torture/torture.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/source3/torture/mangle_test.c b/source3/torture/mangle_test.c index 660d4d17af..9a719349b6 100644 --- a/source3/torture/mangle_test.c +++ b/source3/torture/mangle_test.c @@ -54,7 +54,7 @@ static BOOL test_one(struct cli_state *cli, const char *name) return False; } - snprintf(name2, sizeof(name2), "\\mangle_test\\%s", shortname); + fstr_sprintf(name2, "\\mangle_test\\%s", shortname); if (!cli_unlink(cli, name2)) { printf("unlink of %s (%s) failed (%s)\n", name2, name, cli_errstr(cli)); diff --git a/source3/torture/nsstest.c b/source3/torture/nsstest.c index b5cd59d50b..a803cd7e71 100644 --- a/source3/torture/nsstest.c +++ b/source3/torture/nsstest.c @@ -29,11 +29,11 @@ static int total_errors; static void *find_fn(const char *name) { - char s[1024]; + pstring s; static void *h; void *res; - snprintf(s,sizeof(s), "_nss_%s_%s", nss_name, name); + pstr_sprintf(s, "_nss_%s_%s", nss_name, name); if (!h) { h = sys_dlopen(so_path, RTLD_LAZY); diff --git a/source3/torture/torture.c b/source3/torture/torture.c index f26ebb49b3..0be79d04a9 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -4366,7 +4366,7 @@ static BOOL run_error_map_extract(int dummy) { } for (error=(0xc0000000 | 0x1); error < (0xc0000000| 0xFFF); error++) { - snprintf(user, sizeof(user), "%X", error); + fstr_sprintf(user, "%X", error); if (cli_session_setup(&c_nt, user, password, strlen(password), @@ -4586,7 +4586,7 @@ static BOOL run_test(const char *name) } for (i=0;torture_ops[i].name;i++) { - snprintf(randomfname, sizeof(randomfname), "\\XX%x", + fstr_sprintf(randomfname, "\\XX%x", (unsigned)random()); if (strequal(name, torture_ops[i].name)) { |