projects
/
unix-history
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1e51582
)
fc without arguments dereferences argv[1]; from Christos
author
Keith Bostic
<bostic@ucbvax.Berkeley.EDU>
Tue, 1 Dec 1992 16:34:56 +0000
(08:34 -0800)
committer
Keith Bostic
<bostic@ucbvax.Berkeley.EDU>
Tue, 1 Dec 1992 16:34:56 +0000
(08:34 -0800)
SCCS-vsn: bin/sh/histedit.c 5.1
usr/src/bin/sh/histedit.c
patch
|
blob
|
blame
|
history
diff --git
a/usr/src/bin/sh/histedit.c
b/usr/src/bin/sh/histedit.c
index
a2ab153
..
1143ad9
100644
(file)
--- a/
usr/src/bin/sh/histedit.c
+++ b/
usr/src/bin/sh/histedit.c
@@
-130,6
+130,9
@@
histcmd(argc, argv)
if (hist == NULL)
error("history not active");
if (hist == NULL)
error("history not active");
+
+ if (argc == 1)
+ error("missing history argument");
optreset = 1; optind = 1; /* initialize getopt */
while (not_fcnumber(argv[optind]) &&
optreset = 1; optind = 1; /* initialize getopt */
while (not_fcnumber(argv[optind]) &&