mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[MachO] Add out-of-bounds check to MachOObjectFile.cpp
This is a followup to rL333496. Differential Revision: https://reviews.llvm.org/D47544 llvm-svn: 333929
This commit is contained in:
parent
c7ecc0ce30
commit
5d9dbb96b7
@ -107,6 +107,7 @@ getSectionPtr(const MachOObjectFile &O, MachOObjectFile::LoadCommandInfo L,
|
||||
}
|
||||
|
||||
static const char *getPtr(const MachOObjectFile &O, size_t Offset) {
|
||||
assert(Offset <= O.getData().size());
|
||||
return O.getData().data() + Offset;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user