Skip to content

Commit

Permalink
vulncheck/internal/gosym: fix bug on 32-bit systems
Browse files Browse the repository at this point in the history
I was multiplying an offset by 8, instead of the size of a pointer.

Fixes golang/go#52218.

Change-Id: I396c833e52a96aff34b89e4e53053d15b4a0d1cd
Reviewed-on: https://go-review.googlesource.com/c/vuln/+/398757
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
  • Loading branch information
softdev050 committed Apr 8, 2022
1 parent 2920530 commit 47a3594
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vulncheck/internal/gosym/pclntab.go
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ func (f funcData) funcdataOffset(i uint8) uint32 {
} else {
off = f.fieldOffset(10) + // skip fixed part of _func
f.npcdata()*4
off += uint32(i) * 8
off += uint32(i) * f.t.ptrsize
}
return f.t.binary.Uint32(f.data[off:])
}
Expand Down

0 comments on commit 47a3594

Please sign in to comment.