summaryrefslogtreecommitdiffstats
path: root/lib/libedit
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1995-08-04 19:42:23 +0000
committerache <ache@FreeBSD.org>1995-08-04 19:42:23 +0000
commit7f093ebd6ef5a8e42e84a9f30c7f2788faaf7c73 (patch)
treed86328dc9580d63baf4068db73faeb9e4603f472 /lib/libedit
parent99cef2aaa79c69732233a84462345b30bef389fc (diff)
downloadFreeBSD-src-7f093ebd6ef5a8e42e84a9f30c7f2788faaf7c73.zip
FreeBSD-src-7f093ebd6ef5a8e42e84a9f30c7f2788faaf7c73.tar.gz
Fix sh coredump in vi mode with empty colon command
Diffstat (limited to 'lib/libedit')
-rw-r--r--lib/libedit/parse.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libedit/parse.c b/lib/libedit/parse.c
index a89539c..140a71d 100644
--- a/lib/libedit/parse.c
+++ b/lib/libedit/parse.c
@@ -97,6 +97,9 @@ el_parse(el, argc, argv)
char *ptr;
int i;
+ if (argc < 1)
+ return argc;
+
for (ptr = argv[0]; *ptr && *ptr != ':'; ptr++)
continue;
OpenPOWER on IntegriCloud