Fix the index out of bounds error when the modem FD is missing am: d6f061f45a

Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs201/+/20877560

Change-Id: I3db3b140850c8cf164f87179d31f29d403a7c9ae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Alex Hong 2023-01-13 06:52:00 +00:00 committed by Automerger Merge Worker
commit f918ea1dc9

View file

@ -1400,7 +1400,7 @@ ndk::ScopedAStatus Dumpstate::dumpstateBoard(const std::vector<::ndk::ScopedFile
"Invalid mode"); "Invalid mode");
} }
if (in_fds.size() < 1) { if (in_fds.size() < 2) {
ALOGE("no FD for dumpstate_board binary\n"); ALOGE("no FD for dumpstate_board binary\n");
} else { } else {
int fd_bin = in_fds[1].get(); int fd_bin = in_fds[1].get();