summaryrefslogtreecommitdiffstats
path: root/source/client/clitar.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-08-27 07:39:26 +0000
committerTim Potter <tpot@samba.org>2003-08-27 07:39:26 +0000
commita46e58e2b6e3d9526012d6a2d903163a3373fa59 (patch)
tree1b18e03276a3e0973184e205f71664e97354acc9 /source/client/clitar.c
parent45775b48a0d91390aa698b750d59cda0150cfbd0 (diff)
downloadsamba-a46e58e2b6e3d9526012d6a2d903163a3373fa59.tar.gz
samba-a46e58e2b6e3d9526012d6a2d903163a3373fa59.tar.xz
samba-a46e58e2b6e3d9526012d6a2d903163a3373fa59.zip
Print an error instead of crashing if no argument is specified for
smbclient -T Fixes bug 345.
Diffstat (limited to 'source/client/clitar.c')
-rw-r--r--source/client/clitar.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/client/clitar.c b/source/client/clitar.c
index 5e20c3e11bb..f7a292dbbfe 100644
--- a/source/client/clitar.c
+++ b/source/client/clitar.c
@@ -1775,6 +1775,10 @@ int tar_parseargs(int argc, char *argv[], const char *Optarg, int Optind)
if (tarhandle == 1) {
dbf = x_stderr;
}
+ if (!argv[Optind]) {
+ DEBUG(0,("Must specify tar filename\n"));
+ return 0;
+ }
if (!strcmp(argv[Optind], "-")) {
newOptind++;
}