diff options
| author | Vladimir Gorsunov <gorsunov@gmail.com> | 2025-11-01 17:36:38 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-01 15:36:38 +0000 |
| commit | e3ef3e24f13a3671a08c742e48c324b429ef6417 (patch) | |
| tree | 3aeddfd303955eba64af2007a61cdbb95bf9c110 /llvm/lib | |
| parent | fe1491b7258aaf821cda89d5ed5f5c5248007136 (diff) | |
| download | llvm-e3ef3e24f13a3671a08c742e48c324b429ef6417.zip llvm-e3ef3e24f13a3671a08c742e48c324b429ef6417.tar.gz llvm-e3ef3e24f13a3671a08c742e48c324b429ef6417.tar.bz2 | |
[NativePDB] Fix crash in llvm-pdbutil (#164871)
Fix out of buffer read when value of --type-index was too big
Co-authored-by: Alexandre Ganea <aganea@havenstudios.com>
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp b/llvm/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp index 6c23ba8..23ab534 100644 --- a/llvm/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp +++ b/llvm/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp @@ -102,7 +102,8 @@ std::optional<CVType> LazyRandomTypeCollection::tryGetType(TypeIndex Index) { return std::nullopt; } - assert(contains(Index)); + if (!contains(Index)) + return std::nullopt; return Records[Index.toArrayIndex()].Type; } |
