am 470f0b3f: Merge "Avoid segv by checking argc in "storage user <mountpoint>""

* commit '470f0b3ff46493b4a46b3599db33a29e94615d30':
  Avoid segv by checking argc in "storage user <mountpoint>"
gugelfrei
JP Abgrall 10 years ago committed by Android Git Automerger
commit a821d50bd4

@ -242,6 +242,10 @@ int CommandListener::StorageCmd::runCommand(SocketClient *cli,
DIR *dir;
struct dirent *de;
if (argc < 3) {
cli->sendMsg(ResponseCode::CommandSyntaxError, "Missing Argument: user <mountpoint>", false);
return 0;
}
if (!(dir = opendir("/proc"))) {
cli->sendMsg(ResponseCode::OperationFailed, "Failed to open /proc", true);
return 0;

Loading…
Cancel
Save