summaryrefslogtreecommitdiffstats
path: root/source/client
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2002-01-19 17:29:32 +0000
committerSimo Sorce <idra@samba.org>2002-01-19 17:29:32 +0000
commit6b123adda901ff05b0271eeda060297448f64eec (patch)
treebe347f8ec34eeea959cd8f92806251974c414a0a /source/client
parentaf37a86917c969118a46cff7574487dbe1c75a2f (diff)
downloadsamba-6b123adda901ff05b0271eeda060297448f64eec.tar.gz
samba-6b123adda901ff05b0271eeda060297448f64eec.tar.xz
samba-6b123adda901ff05b0271eeda060297448f64eec.zip
fixes (asprintf) from 2.2
Diffstat (limited to 'source/client')
-rw-r--r--source/client/client.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/client/client.c b/source/client/client.c
index f1059f8ee1f..eb9750299b7 100644
--- a/source/client/client.c
+++ b/source/client/client.c
@@ -1343,7 +1343,7 @@ static int cmd_mput(void)
/* if (!recurse) continue; */
SAFE_FREE(quest);
- asprintf(&quest, "Put directory %s? ", lname);
+ if (asprintf(&quest, "Put directory %s? ", lname) < 0) break;
if (prompt && !yesno(quest)) { /* No */
/* Skip the directory */
lname[strlen(lname)-1] = '/';
@@ -1351,7 +1351,7 @@ static int cmd_mput(void)
break;
} else { /* Yes */
SAFE_FREE(rname);
- asprintf(&rname, "%s%s", cur_dir, lname);
+ if(asprintf(&rname, "%s%s", cur_dir, lname) < 0) break;
dos_format(rname);
if (!cli_chkpath(cli, rname) &&
!do_mkdir(rname)) {
@@ -1365,13 +1365,13 @@ static int cmd_mput(void)
continue;
} else {
SAFE_FREE(quest);
- asprintf(&quest,"Put file %s? ", lname);
+ if (asprintf(&quest,"Put file %s? ", lname) < 0) break;
if (prompt && !yesno(quest)) /* No */
continue;
/* Yes */
SAFE_FREE(rname);
- asprintf(&rname, "%s%s", cur_dir, lname);
+ if (asprintf(&rname, "%s%s", cur_dir, lname) < 0) break;
}
dos_format(rname);