From fab281f46542c1980590f245a97ed751e265d34a Mon Sep 17 00:00:00 2001 From: Love Hornquist Astrand Date: Thu, 30 Jul 2009 13:00:34 +0200 Subject: [PATCH] (setnmap): make sure strchr returned a string [CID-65] --- appl/ftp/ftp/cmds.c | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.11.4.GIT