[llvm] [BitcodeReader] Add bounds checking on Strtab (PR #76403)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 26 13:45:55 PST 2023
================
@@ -4218,6 +4218,10 @@ Error BitcodeReader::parseGlobalIndirectSymbolRecord(
// Check whether we have enough values to read a partition name.
if (OpNum + 1 < Record.size()) {
+ // Check Strtab has enough values for the partition.
+ if (Record[OpNum] + Record[OpNum + 1] > Strtab.size()) {
+ return error("Malformed partition, too large.");
+ }
----------------
DavidKorczynski wrote:
Fixed
https://github.com/llvm/llvm-project/pull/76403
More information about the llvm-commits
mailing list