artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a9ac2d
)
Fence off NULL args in getcmd() (fixes/works around PR#824)
author
deraadt
<deraadt@openbsd.org>
Fri, 10 May 1996 12:59:51 +0000
(12:59 +0000)
committer
deraadt
<deraadt@openbsd.org>
Fri, 10 May 1996 12:59:51 +0000
(12:59 +0000)
usr.bin/ftp/main.c
patch
|
blob
|
history
diff --git
a/usr.bin/ftp/main.c
b/usr.bin/ftp/main.c
index
0c34202
..
a9b2116
100644
(file)
--- a/
usr.bin/ftp/main.c
+++ b/
usr.bin/ftp/main.c
@@
-41,7
+41,7
@@
static char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 10/9/94";
#else
-static char rcsid[] = "$NetBSD: main.c,v 1.1
0 1995/09/15 00:32:33
pk Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.1
1 1996/05/07 00:16:55
pk Exp $";
#endif
#endif /* not lint */
@@
-288,6
+288,9
@@
getcmd(name)
struct cmd *c, *found;
int nmatches, longest;
+ if (name == NULL)
+ return (0);
+
longest = 0;
nmatches = 0;
found = 0;