[llvm] [llvm][ELF]Add Shdr check for getBuildID (PR #126537)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 22 01:07:50 PDT 2025
================
@@ -435,7 +436,8 @@ class ELFFile {
Elf_Note_Iterator notes_begin(const Elf_Shdr &Shdr, Error &Err) const {
assert(Shdr.sh_type == ELF::SHT_NOTE && "Shdr is not of type SHT_NOTE");
ErrorAsOutParameter ErrAsOutParam(Err);
- if (Shdr.sh_offset + Shdr.sh_size > getBufSize()) {
+ if (Shdr.sh_offset + Shdr.sh_size > getBufSize() ||
----------------
jh7370 wrote:
Same as above.
https://github.com/llvm/llvm-project/pull/126537
More information about the llvm-commits
mailing list