From 0c85e2760f6b5016c16d29f8c2f63f3ba2cf5298 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 3 Jan 2024 19:04:11 +0100 Subject: Merge llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4. PR: 276104 MFC after: 1 month (cherry picked from commit 647cbc5de815c5651677bf8582797f716ec7b48d) --- contrib/llvm-project/llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'contrib/llvm-project/llvm/lib/Bitcode/Reader/BitcodeReader.cpp') diff --git a/contrib/llvm-project/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/contrib/llvm-project/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 8907f6fa4ff3..a027d0c21ba0 100644 --- a/contrib/llvm-project/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/contrib/llvm-project/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -4218,6 +4218,9 @@ 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."); NewGA->setPartition( StringRef(Strtab.data() + Record[OpNum], Record[OpNum + 1])); OpNum += 2; -- cgit v1.2.3