ftpd: fix nil pointer derefernece when ominiting arguments to opts command

This commit is contained in:
cinap_lenrek 2013-04-23 22:47:27 +02:00
parent 922d6d0780
commit 8858fdf15f

View file

@ -485,6 +485,10 @@ optscmd(char *arg)
{
char *p;
if(arg == 0 || *arg == 0){
reply("501 Syntax error in parameters or arguments");
return 0;
}
if(p = strchr(arg, ' '))
*p = 0;
if(cistrcmp(arg, "UTF-8") == 0){