diff options
author | Jeremy Allison <jra@samba.org> | 2012-08-08 17:01:00 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2012-08-09 12:08:18 -0700 |
commit | b70f23c2b581c5d455362ab37f4846de9a910055 (patch) | |
tree | cf95e8d35a03d1e39d5926d2e03d7046d42cae64 /source3/client | |
parent | ce21d0804012da27cec72abe896352d7f0e7e1e5 (diff) | |
download | samba-b70f23c2b581c5d455362ab37f4846de9a910055.tar.gz samba-b70f23c2b581c5d455362ab37f4846de9a910055.tar.bz2 samba-b70f23c2b581c5d455362ab37f4846de9a910055.zip |
Correctly check for errors in strlower_m() returns.
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/client.c | 9 | ||||
-rw-r--r-- | source3/client/clitar.c | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 28fc30aeb4..2c949ac476 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -1086,7 +1086,10 @@ static int do_get(const char *rname, const char *lname_in, bool reget) } if (lowercase) { - strlower_m(lname); + if (!strlower_m(lname)) { + d_printf("strlower_m %s failed\n", lname); + return 1; + } } status = cli_resolve_path(ctx, "", auth_info, cli, rname, &targetcli, @@ -1296,7 +1299,9 @@ static NTSTATUS do_mget(struct cli_state *cli_state, struct file_info *finfo, string_replace(finfo->name,'\\','/'); if (lowercase) { - strlower_m(finfo->name); + if (!strlower_m(finfo->name)) { + return NT_STATUS_INVALID_PARAMETER; + } } if (!directory_exist(finfo->name) && diff --git a/source3/client/clitar.c b/source3/client/clitar.c index c0b6e4e7f1..cae512b5e9 100644 --- a/source3/client/clitar.c +++ b/source3/client/clitar.c @@ -173,7 +173,7 @@ static void writetarheader(int f, const char *aname, uint64_t size, time_t mtime fixtarname(hb.dbuf.name, aname, (l+2 >= NAMSIZ) ? NAMSIZ : l + 2); if (lowercase) - strlower_m(hb.dbuf.name); + (void)strlower_m(hb.dbuf.name); /* write out a "standard" tar format header */ |