Differential Revision: http://reviews.llvm.org/D7733
llvm-svn: 229912
bool ArchHandler::isDwarfCIE(bool isBig, const DefinedAtom *atom) {
assert(atom->contentType() == DefinedAtom::typeCFI);
+ if (atom->rawContent().size() < sizeof(uint32_t))
+ return false;
uint32_t size = read32(atom->rawContent().data(), isBig);
uint32_t idOffset = sizeof(uint32_t);
}
}
+ if (atom->rawContent().size() < 4 * sizeof(uint32_t))
+ return entry;
+
using normalized::read32;
entry.rangeLength =
read32(atom->rawContent().data() + 2 * sizeof(uint32_t), _isBig);