ftpd: fix nil pointer derefernece when ominiting arguments to opts command
This commit is contained in:
parent
922d6d0780
commit
8858fdf15f
|
@ -485,6 +485,10 @@ optscmd(char *arg)
|
||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
|
if(arg == 0 || *arg == 0){
|
||||||
|
reply("501 Syntax error in parameters or arguments");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if(p = strchr(arg, ' '))
|
if(p = strchr(arg, ' '))
|
||||||
*p = 0;
|
*p = 0;
|
||||||
if(cistrcmp(arg, "UTF-8") == 0){
|
if(cistrcmp(arg, "UTF-8") == 0){
|
||||||
|
|
Loading…
Reference in a new issue