debug/macho: use saferio to read segment and section data
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 <ae171625adc8645b8b79b7e405a6da5aba5341e0@google.com>
Run-TryBot: Dan Kortschak <2591e5f46f28d303f9dc027d475a5c60d8dea17a@kortschak.io>
Auto-Submit: Ian Lance Taylor <87e9c6d529889242b7e184afb632328636553ab4@google.com>
Reviewed-by: hopehook <63023fcaeafd0730eb709923fc3c0482e6977249@qq.com>
Reviewed-by: Ian Lance Taylor <87e9c6d529889242b7e184afb632328636553ab4@google.com>
Run-TryBot: Ian Lance Taylor <87e9c6d529889242b7e184afb632328636553ab4@google.com>
TryBot-Result: Gopher Robot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>

golang/go,golang/go,golang/go,golang/go,golang/go,golang/go,golang/go,golang/go