[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
================
@@ -80,9 +82,10 @@ TEST(BuildIDTest, InvalidPhdrFileSizeNoShdrs) {
BuildIDRef BuildID = getBuildID(&ElfOrErr.get());
EXPECT_EQ(
StringRef(reinterpret_cast<const char *>(BuildID.data()), BuildID.size()),
- "\xAB\xB5\x0D\x82\xB6\xBD\xC8\x61");
+ "");
}
+// the code handles a malformed section header that points at data outside the file.
----------------
jh7370 wrote:
```suggestion
// The code handles a malformed section header that points at data outside the file.
```
https://github.com/llvm/llvm-project/pull/126537
More information about the llvm-commits
mailing list