diff --git a/CommandListener.cpp b/CommandListener.cpp index 3a327f1..562b5c2 100644 --- a/CommandListener.cpp +++ b/CommandListener.cpp @@ -240,6 +240,10 @@ int CommandListener::StorageCmd::runCommand(SocketClient *cli, DIR *dir; struct dirent *de; + if (argc < 3) { + cli->sendMsg(ResponseCode::CommandSyntaxError, "Missing Argument: user ", false); + return 0; + } if (!(dir = opendir("/proc"))) { cli->sendMsg(ResponseCode::OperationFailed, "Failed to open /proc", true); return 0;