forked from OSchip/llvm-project
[COFFDumper] Make sure there is sufficient padding left in the string table
llvm-svn: 271146
This commit is contained in:
parent
c6cb2ec36e
commit
efaaf410a6
|
@ -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