diff --git a/appl/ftp/ftp/cmds.c b/appl/ftp/ftp/cmds.c index 43842c8de..0c1355a8e 100644 --- a/appl/ftp/ftp/cmds.c +++ b/appl/ftp/ftp/cmds.c @@ -1759,6 +1759,11 @@ setnmap(int argc, char **argv) mapflag = 1; code = 1; cp = strchr(altarg, ' '); + if (cp == NULL) { + printf("Usage: %s missing space\n",argv[0]); + code = -1; + return; + } if (proxy) { while(*++cp == ' ') continue;