llvm.org GIT mirror llvm / 8343a0a
[llvm-readobj] Re-add sanity checking which was accidentally removed in r241764 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241831 91177308-0d34-0410-b5e6-96231b3b80d8 David Majnemer 5 years ago
1 changed file(s) with 9 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
596596 // in the line table. The filename string is accessed using double
597597 // indirection to the string table subsection using the index subsection.
598598 uint32_t OffsetInIndex = DE.getU32(&Offset),
599 SegmentLength = DE.getU32(&Offset);
600 Offset += sizeof(uint32_t); // Skip FullSegmentSize
599 SegmentLength = DE.getU32(&Offset),
600 FullSegmentSize = DE.getU32(&Offset);
601
602 if (FullSegmentSize !=
603 12 + 8 * SegmentLength +
604 (HasColumnInformation ? 4 * SegmentLength : 0)) {
605 error(object_error::parse_failed);
606 return;
607 }
601608
602609 uint32_t FilenameOffset;
603610 {