Commits

Anonymous committed 470f0b3 Merge

Merge "Avoid segv by checking argc in "storage user <mountpoint>""

  • Participants
  • Parent commits 3c0d02a, edf7adf

Comments (0)

Files changed (1)

File CommandListener.cpp

         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;