commit | 25e712ce82d041051b802f3605b00c8fbb53029a | [log] [tgz] |
---|---|---|
author | Benjamin Lerman <qsr@google.com> | Tue Sep 27 16:20:24 2022 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Tue Sep 27 16:20:24 2022 +0000 |
tree | 0dbc46f88ebaa644e25942323d8b4723ddcbb0e8 | |
parent | 72f572185f42d1e591d6ba88c5b9b19155fa0bb9 [diff] | |
parent | 27a37e70a7a1476f42217cdb425d06038bea0d78 [diff] |
Merge "fdsan: fix overflow in FdTableImpl::at"
diff --git a/libc/bionic/fdsan.cpp b/libc/bionic/fdsan.cpp index f7f4d31..6433b59 100644 --- a/libc/bionic/fdsan.cpp +++ b/libc/bionic/fdsan.cpp
@@ -101,7 +101,7 @@ } size_t offset = idx - inline_fds; - if (local_overflow->len < offset) { + if (local_overflow->len <= offset) { return nullptr; } return &local_overflow->entries[offset];