]> Cypherpunks repositories - gostls13.git/commit
debug/macho: use saferio to read segment and section data
authorDan Kortschak <dan@kortschak.io>
Wed, 24 Aug 2022 12:30:11 +0000 (22:00 +0930)
committerGopher Robot <gobot@golang.org>
Fri, 26 Aug 2022 17:44:36 +0000 (17:44 +0000)
commit297e3de7a1416d2ccdadcf3bdc6c9d3776e2abd8
tree24fe609c2bcd1c3e0e2a4fc2cc1edc20434d7dbd
parent6ba2674ddc5373f261211ba5ebc38496dc660604
debug/macho: use saferio to read segment and section data

Avoid allocating large amounts of memory for corrupt input.

No test case because the problem can only happen for invalid data.
Let the fuzzer find cases like this.

Change-Id: Ib09d5fea54aabcb6941e541b42689222fba69632
Reviewed-on: https://go-review.googlesource.com/c/go/+/425303
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Dan Kortschak <dan@kortschak.io>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: hopehook <hopehook@qq.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/debug/macho/file.go