diff options
author | ache <ache@FreeBSD.org> | 1995-08-04 19:42:23 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1995-08-04 19:42:23 +0000 |
commit | 7f093ebd6ef5a8e42e84a9f30c7f2788faaf7c73 (patch) | |
tree | d86328dc9580d63baf4068db73faeb9e4603f472 /lib/libedit | |
parent | 99cef2aaa79c69732233a84462345b30bef389fc (diff) | |
download | FreeBSD-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.c | 3 |
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; |