]> Cypherpunks repositories - gostls13.git/commit
debug/elf: avoid decompress of section twice
authorMeng Zhuo <mzh@golangcn.org>
Sun, 2 Apr 2023 12:01:28 +0000 (20:01 +0800)
committerGopher Robot <gobot@golang.org>
Tue, 11 Apr 2023 13:16:24 +0000 (13:16 +0000)
commit705e2e987e229a913b687561a6370e77dbab4165
treec973c5cfbc7297d1f0de509c976c97f6a730827c
parentf736a9ad0105b7906636aab43df96123d0f32d70
debug/elf: avoid decompress of section twice

In rare cases, elf will get a corrupted section starts with 0x1,
which happens to be COMPRESS_ZLIB that causing decompress twice.
This CL drops sectionData decompress data after open section.

Fixes #59208

Change-Id: I7999a55868b3b3481509e1ac35985f7580f0f688
Reviewed-on: https://go-review.googlesource.com/c/go/+/480895
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: M Zhuo <mzh@golangcn.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/debug/elf/file.go
src/debug/elf/file_test.go