diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-04-23 22:47:27 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-04-23 22:47:27 +0200 |
commit | 8858fdf15f576a3d27afb2e552edce2a85bbcbe7 (patch) | |
tree | 3a323dce73370bb44872cdbce76aea7b34f0c70b | |
parent | 922d6d0780e3935c0e7e0a25ad781d011f5db941 (diff) | |
download | plan9front-8858fdf15f576a3d27afb2e552edce2a85bbcbe7.tar.xz |
ftpd: fix nil pointer derefernece when ominiting arguments to opts command
-rw-r--r-- | sys/src/cmd/ip/ftpd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/src/cmd/ip/ftpd.c b/sys/src/cmd/ip/ftpd.c index e244c39be..3f0ee55cd 100644 --- a/sys/src/cmd/ip/ftpd.c +++ b/sys/src/cmd/ip/ftpd.c @@ -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){ |