summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-06-16 12:23:31 +0200
committerKarolin Seeger <kseeger@samba.org>2009-06-29 12:50:18 +0200
commita13411770606eb868e2f65039038a7ad341e2ab6 (patch)
tree24f6619a716c5d889d5beaed74398e2fc84f0456
parent471f905f788209d0e76ca2d327d30f830ce4648c (diff)
downloadsamba-a13411770606eb868e2f65039038a7ad341e2ab6.tar.gz
samba-a13411770606eb868e2f65039038a7ad341e2ab6.tar.xz
samba-a13411770606eb868e2f65039038a7ad341e2ab6.zip
Fix bug 6478
This is the part of checkin cfee2025 that is relevant to this bug. (cherry picked from commit 91ea0d3fa11fc209dc653dd09dfab6244fb80f0d)
-rw-r--r--source/client/client.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/source/client/client.c b/source/client/client.c
index 9e1173765ec..824dc32c86d 100644
--- a/source/client/client.c
+++ b/source/client/client.c
@@ -364,7 +364,7 @@ static int do_cd(const char *new_dir)
/* Ensure cur_dir ends in a DIRSEP */
if ((new_cd[0] != '\0') && (*(new_cd+strlen(new_cd)-1) != CLI_DIRSEP_CHAR)) {
- new_cd = talloc_asprintf_append(new_cd, CLI_DIRSEP_STR);
+ new_cd = talloc_asprintf_append(new_cd, "%s", CLI_DIRSEP_STR);
if (!new_cd) {
goto out;
}
@@ -871,7 +871,7 @@ static int cmd_dir(void)
if (*buf == CLI_DIRSEP_CHAR) {
mask = talloc_strdup(ctx, buf);
} else {
- mask = talloc_asprintf_append(mask, buf);
+ mask = talloc_asprintf_append(mask, "%s", buf);
}
} else {
mask = talloc_asprintf_append(mask, "*");
@@ -912,7 +912,7 @@ static int cmd_du(void)
return 1;
}
if ((mask[0] != '\0') && (mask[strlen(mask)-1]!=CLI_DIRSEP_CHAR)) {
- mask = talloc_asprintf_append(mask, CLI_DIRSEP_STR);
+ mask = talloc_asprintf_append(mask, "%s", CLI_DIRSEP_STR);
if (!mask) {
return 1;
}
@@ -923,7 +923,7 @@ static int cmd_du(void)
if (*buf == CLI_DIRSEP_CHAR) {
mask = talloc_strdup(ctx, buf);
} else {
- mask = talloc_asprintf_append(mask, buf);
+ mask = talloc_asprintf_append(mask, "%s", buf);
}
} else {
mask = talloc_strdup(ctx, "*");
@@ -1107,7 +1107,7 @@ static int cmd_get(void)
d_printf("get <filename> [localname]\n");
return 1;
}
- rname = talloc_asprintf_append(rname, fname);
+ rname = talloc_asprintf_append(rname, "%s", fname);
if (!rname) {
return 1;
}
@@ -1266,7 +1266,7 @@ static int cmd_more(void)
unlink(lname);
return 1;
}
- rname = talloc_asprintf_append(rname, fname);
+ rname = talloc_asprintf_append(rname, "%s", fname);
if (!rname) {
return 1;
}
@@ -1318,7 +1318,7 @@ static int cmd_mget(void)
mget_mask = talloc_strdup(ctx, buf);
} else {
mget_mask = talloc_asprintf_append(mget_mask,
- buf);
+ "%s", buf);
}
if (!mget_mask) {
return 1;
@@ -1419,7 +1419,7 @@ static int cmd_mkdir(void)
}
return 1;
}
- mask = talloc_asprintf_append(mask, buf);
+ mask = talloc_asprintf_append(mask, "%s", buf);
if (!mask) {
return 1;
}
@@ -1448,14 +1448,14 @@ static int cmd_mkdir(void)
trim_char(ddir,'.','\0');
p = strtok_r(ddir, "/\\", &saveptr);
while (p) {
- ddir2 = talloc_asprintf_append(ddir2, p);
+ ddir2 = talloc_asprintf_append(ddir2, "%s", p);
if (!ddir2) {
return 1;
}
if (!cli_chkpath(targetcli, ddir2)) {
do_mkdir(ddir2);
}
- ddir2 = talloc_asprintf_append(ddir2, CLI_DIRSEP_STR);
+ ddir2 = talloc_asprintf_append(ddir2, "%s", CLI_DIRSEP_STR);
if (!ddir2) {
return 1;
}
@@ -1487,7 +1487,7 @@ static int cmd_altname(void)
d_printf("altname <file>\n");
return 1;
}
- name = talloc_asprintf_append(name, buf);
+ name = talloc_asprintf_append(name, "%s", buf);
if (!name) {
return 1;
}
@@ -1571,7 +1571,7 @@ static int cmd_allinfo(void)
d_printf("allinfo <file>\n");
return 1;
}
- name = talloc_asprintf_append(name, buf);
+ name = talloc_asprintf_append(name, "%s", buf);
if (!name) {
return 1;
}
@@ -1738,9 +1738,9 @@ static int cmd_put(void)
}
if (next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
- rname = talloc_asprintf_append(rname, buf);
+ rname = talloc_asprintf_append(rname, "%s", buf);
} else {
- rname = talloc_asprintf_append(rname, lname);
+ rname = talloc_asprintf_append(rname, "%s", lname);
}
if (!rname) {
return 1;
@@ -2137,7 +2137,7 @@ static int cmd_del(void)
d_printf("del <filename>\n");
return 1;
}
- mask = talloc_asprintf_append(mask, buf);
+ mask = talloc_asprintf_append(mask, "%s", buf);
if (!mask) {
return 1;
}
@@ -3529,7 +3529,7 @@ static int cmd_reget(void)
d_printf("reget <filename>\n");
return 1;
}
- remote_name = talloc_asprintf_append(remote_name, fname);
+ remote_name = talloc_asprintf_append(remote_name, "%s", fname);
if (!remote_name) {
return 1;
}
@@ -3576,10 +3576,10 @@ static int cmd_reput(void)
if (next_token_talloc(ctx, &cmd_ptr, &buf, NULL)) {
remote_name = talloc_asprintf_append(remote_name,
- buf);
+ "%s", buf);
} else {
remote_name = talloc_asprintf_append(remote_name,
- local_name);
+ "%s", local_name);
}
if (!remote_name) {
return 1;
@@ -4112,13 +4112,13 @@ static void completion_remote_filter(const char *mnt,
TALLOC_FREE(ctx);
return;
}
- tmp = talloc_asprintf_append(tmp, f->name);
+ tmp = talloc_asprintf_append(tmp, "%s", f->name);
if (!tmp) {
TALLOC_FREE(ctx);
return;
}
if (f->mode & aDIR) {
- tmp = talloc_asprintf_append(tmp, CLI_DIRSEP_STR);
+ tmp = talloc_asprintf_append(tmp, "%s", CLI_DIRSEP_STR);
}
if (!tmp) {
TALLOC_FREE(ctx);