forked from OSchip/llvm-project
[COFFDumper] Make sure there is sufficient padding left in the checksum
llvm-svn: 271143
This commit is contained in:
parent
b343310b4f
commit
37dafba713
|
@ -940,6 +940,8 @@ void COFFDumper::printCodeViewFileChecksums(StringRef Subsection) {
|
|||
W.printBinary("ChecksumBytes", ChecksumBytes);
|
||||
unsigned PaddedSize = alignTo(FC->ChecksumSize + sizeof(FileChecksum), 4) -
|
||||
sizeof(FileChecksum);
|
||||
if (PaddedSize > Data.size())
|
||||
error(object_error::parse_failed);
|
||||
Data = Data.drop_front(PaddedSize);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue