[BitcodeReader] Make sure abbrev records have at least one operand (record code)
Bug found with AFL fuzz. llvm-svn: 238265
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