mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-07 08:24:27 +00:00
[BitcodeReader] Make sure abbrev records have at least one operand (record code)
Bug found with AFL fuzz. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238265 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -282,6 +282,9 @@ void BitstreamCursor::ReadAbbrevRecord() {
|
||||
} else
|
||||
Abbv->Add(BitCodeAbbrevOp(E));
|
||||
}
|
||||
|
||||
if (Abbv->getNumOperandInfos() == 0)
|
||||
report_fatal_error("Abbrev record with no operands");
|
||||
CurAbbrevs.push_back(Abbv);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user