Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0d5639
)
check for right number of arguments _after_ the option parsing.
author
Andrew Tridgell
<tridge@samba.org>
Sat, 16 May 1998 15:18:07 +0000
(15:18 +0000)
committer
Andrew Tridgell
<tridge@samba.org>
Sat, 16 May 1998 15:18:07 +0000
(15:18 +0000)
this stops "rsync -v" causing a segv.
main.c
patch
|
blob
|
blame
|
history
diff --git
a/main.c
b/main.c
index
0a57af6
..
f557e55
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-492,6
+492,11
@@
int main(int argc,char *argv[])
argv += optind;
optind = 0;
+ if (argc < 1) {
+ usage(FERROR);
+ exit(1);
+ }
+
signal(SIGCHLD,SIG_IGN);
signal(SIGINT,SIGNAL_CAST sig_int);
signal(SIGPIPE,SIGNAL_CAST sig_int);