OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
65da601
)
[MachO] Add out-of-bounds check to MachOObjectFile.cpp
author
Sam Clegg
<sbc@chromium.org>
Mon, 4 Jun 2018 17:01:20 +0000
(17:01 +0000)
committer
Sam Clegg
<sbc@chromium.org>
Mon, 4 Jun 2018 17:01:20 +0000
(17:01 +0000)
This is a followup to rL333496.
Differential Revision: https://reviews.llvm.org/D47544
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333929
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Object/MachOObjectFile.cpp
patch
|
blob
|
history
diff --git
a/lib/Object/MachOObjectFile.cpp
b/lib/Object/MachOObjectFile.cpp
index
50dd476
..
731ff4e
100644
(file)
--- a/
lib/Object/MachOObjectFile.cpp
+++ b/
lib/Object/MachOObjectFile.cpp
@@
-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;
}