mirror of
https://github.com/golang/go
synced 2024-11-26 16:07:00 -07:00
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>
This commit is contained in:
parent
375a80c9ef
commit
f3563bc55c
@ -98,7 +98,7 @@ type Section struct {
|
|||||||
|
|
||||||
// Data reads and returns the contents of the PE section s.
|
// Data reads and returns the contents of the PE section s.
|
||||||
func (s *Section) Data() ([]byte, error) {
|
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.
|
// Open returns a new ReadSeeker reading the PE section s.
|
||||||
|
Loading…
Reference in New Issue
Block a user