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 string table
llvm-svn: 271146
This commit is contained in:
parent
40cf622629
commit
35bdb1faa1
@ -687,7 +687,10 @@ void COFFDumper::initializeFileAndStringTables(StringRef Data) {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
Data = Data.drop_front(alignTo(SubSectionSize, 4));
|
||||
uint32_t PaddedSize = alignTo(SubSectionSize, 4);
|
||||
if (PaddedSize > Data.size())
|
||||
error(object_error::parse_failed);
|
||||
Data = Data.drop_front(PaddedSize);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user