aboutsummaryrefslogtreecommitdiff
path: root/src/debug
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2022-08-16 20:45:59 -0700
committerGopher Robot <gobot@golang.org>2022-08-19 21:29:19 +0000
commitf3563bc55c7029473aeaf228171ecd06f1317532 (patch)
treec62ea8a01038e56951a4457bb960c65eed51cbf2 /src/debug
parent375a80c9ef521404f1d972ad82719f90bc3a019f (diff)
downloadgo-f3563bc55c7029473aeaf228171ecd06f1317532.tar.xz
debug/pe: fetch section size directly in (*Section).Data
Change-Id: Idc1f8b3fb6b4b2fdcc6dade048cc14c53715319f Reviewed-on: https://go-review.googlesource.com/c/go/+/424197 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Diffstat (limited to 'src/debug')
-rw-r--r--src/debug/pe/section.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/debug/pe/section.go b/src/debug/pe/section.go
index 997f0ef714..fabb47af2e 100644
--- a/src/debug/pe/section.go
+++ b/src/debug/pe/section.go
@@ -98,7 +98,7 @@ type Section struct {
// Data reads and returns the contents of the PE section s.
func (s *Section) Data() ([]byte, error) {
- return saferio.ReadDataAt(s.sr, uint64(s.sr.Size()), 0)
+ return saferio.ReadDataAt(s.sr, uint64(s.Size), 0)
}
// Open returns a new ReadSeeker reading the PE section s.