]> Cypherpunks repositories - gostls13.git/commit
debug/macho: use saferio to allocate Load and Symbol slices
authorDan Kortschak <dan@kortschak.io>
Sat, 27 Aug 2022 03:12:26 +0000 (12:42 +0930)
committerGopher Robot <gobot@golang.org>
Mon, 29 Aug 2022 20:08:15 +0000 (20:08 +0000)
commit36d1f236610a436bcbceca11e040a65593f1f253
tree2d53673fe5c5b3e68ebe903c112cda921d8d9ce7
parentf3a1f9220a8a5265842f5cb877c4dc6d08f75c68
debug/macho: use saferio to allocate Load and Symbol slices

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: I2d1745200611f0af06ca58adcc3e2309ad6742d8
Reviewed-on: https://go-review.googlesource.com/c/go/+/425882
Run-TryBot: Dan Kortschak <dan@kortschak.io>
Auto-Submit: Dan Kortschak <dan@kortschak.io>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
src/debug/macho/file.go