]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/internal/goobj: fix the size of Header
authormstmdev <mstmdev@gmail.com>
Mon, 21 Aug 2023 09:04:07 +0000 (09:04 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 24 Aug 2023 18:14:04 +0000 (18:14 +0000)
Missed the length of the Fingerprint field.

Change-Id: I690955466895e73821dc1e30f8400efc30338ae6
GitHub-Last-Rev: 87bd06d8053c003a412a6ea11b3eafcc280b94d1
GitHub-Pull-Request: golang/go#62174
Reviewed-on: https://go-review.googlesource.com/c/go/+/521495
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>

src/cmd/internal/goobj/objfile.go

index a8d68d873d630fe67fb8108b14adc5b396fb0da3..6c0f5e6665a4601bebc8dfb1f9cd61e5102b0a6d 100644 (file)
@@ -244,7 +244,7 @@ func (h *Header) Read(r *Reader) error {
 }
 
 func (h *Header) Size() int {
-       return len(h.Magic) + 4 + 4*len(h.Offsets)
+       return len(h.Magic) + len(h.Fingerprint) + 4 + 4*len(h.Offsets)
 }
 
 // Autolib