Merge fix from r1.108 of NetBSD's usr.bin/ftp/main.c:

Only attempt to el_parse() a command unknown by the default parser
if editing is enabled.

PR:		bin/100089
MFC after:	3 days
This commit is contained in:
brucec 2011-02-27 10:13:16 +00:00
parent 612236e2e2
commit 30e5ad438a

View File

@ -707,6 +707,7 @@ cmdscanner(void)
* such commands as invalid.
*/
if (strchr(margv[0], ':') != NULL ||
!editing ||
el_parse(el, margc, (const char **)margv) != 0)
#endif /* !NO_EDITCOMPLETE */
fputs("?Invalid command.\n", ttyout);