(setnmap): make sure strchr returned a string [CID-65]
This commit is contained in:
@@ -1759,6 +1759,11 @@ setnmap(int argc, char **argv)
|
|||||||
mapflag = 1;
|
mapflag = 1;
|
||||||
code = 1;
|
code = 1;
|
||||||
cp = strchr(altarg, ' ');
|
cp = strchr(altarg, ' ');
|
||||||
|
if (cp == NULL) {
|
||||||
|
printf("Usage: %s missing space\n",argv[0]);
|
||||||
|
code = -1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (proxy) {
|
if (proxy) {
|
||||||
while(*++cp == ' ')
|
while(*++cp == ' ')
|
||||||
continue;
|
continue;
|
||||||
|
Reference in New Issue
Block a user