aboutsummaryrefslogtreecommitdiff
path: root/src/debug
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug')
-rw-r--r--src/debug/plan9obj/file.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/debug/plan9obj/file.go b/src/debug/plan9obj/file.go
index aa25809148..2b83f9bdff 100644
--- a/src/debug/plan9obj/file.go
+++ b/src/debug/plan9obj/file.go
@@ -212,6 +212,9 @@ func walksymtab(data []byte, ptrsz int, fn func(sym) error) error {
p = p[4:]
}
+ if len(p) < 1 {
+ return &formatError{len(data), "unexpected EOF", nil}
+ }
typ := p[0] & 0x7F
s.typ = typ
p = p[1:]