mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
[COFFDumper] Make sure there is sufficient padding left in the checksum
llvm-svn: 271143
This commit is contained in:
parent
c990a21322
commit
224ed127b5
@ -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
Block a user