aboutsummaryrefslogtreecommitdiff
path: root/src/debug/elf/file_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug/elf/file_test.go')
-rw-r--r--src/debug/elf/file_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/debug/elf/file_test.go b/src/debug/elf/file_test.go
index d7c1e9f800..b826a0ff05 100644
--- a/src/debug/elf/file_test.go
+++ b/src/debug/elf/file_test.go
@@ -810,3 +810,14 @@ func TestNoSectionOverlaps(t *testing.T) {
}
}
}
+
+func TestIssue10996(t *testing.T) {
+ data := []byte("\u007fELF\x02\x01\x010000000000000" +
+ "\x010000000000000000000" +
+ "\x00\x00\x00\x00\x00\x00\x00\x0000000000\x00\x00\x00\x00" +
+ "0000")
+ _, err := NewFile(bytes.NewReader(data))
+ if err == nil {
+ t.Fatalf("opening invalid ELF file unexpectedly suceeded")
+ }
+}