fdsan: fix overflow in FdTableImpl::at

Change-Id: Ia687eb52a9c5469225550316f884c229a2218724
This commit is contained in:
Benjamin Lerman 2022-09-27 11:35:52 +02:00
parent 72f572185f
commit 27a37e70a7
1 changed files with 1 additions and 1 deletions

View File

@ -101,7 +101,7 @@ FdEntry* FdTableImpl<inline_fds>::at(size_t idx) {
}
size_t offset = idx - inline_fds;
if (local_overflow->len < offset) {
if (local_overflow->len <= offset) {
return nullptr;
}
return &local_overflow->entries[offset];