diff options
author | Alex Hong <rurumihong@google.com> | 2023-01-09 21:25:07 +0800 |
---|---|---|
committer | Alex Hong <rurumihong@google.com> | 2023-01-09 21:34:14 +0800 |
commit | d6f061f45a97f3ad0f89619442b24b879cea149e (patch) | |
tree | 1d6825a1e69d93c0cd4a371a8932c70740dd9be6 | |
parent | 33673ae71f0022db71333f11822a442e8544425d (diff) | |
download | gs201-d6f061f45a97f3ad0f89619442b24b879cea149e.tar.gz |
Fix the index out of bounds error when the modem FD is missing
Bug: 263783650
Test: atest VtsHalDumpstateTargetTest pass
Change-Id: I3795244e111bbf18b1a2a2a27a93242b4015baa7
-rw-r--r-- | dumpstate/Dumpstate.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dumpstate/Dumpstate.cpp b/dumpstate/Dumpstate.cpp index 59fc01b..4921ca4 100644 --- a/dumpstate/Dumpstate.cpp +++ b/dumpstate/Dumpstate.cpp @@ -1400,7 +1400,7 @@ ndk::ScopedAStatus Dumpstate::dumpstateBoard(const std::vector<::ndk::ScopedFile "Invalid mode"); } - if (in_fds.size() < 1) { + if (in_fds.size() < 2) { ALOGE("no FD for dumpstate_board binary\n"); } else { int fd_bin = in_fds[1].get(); |