]> Cypherpunks.ru repositories - gostls13.git/commit
debug/dwarf: better error detection in parseUnits
authorThan McIntosh <thanm@google.com>
Fri, 18 Mar 2022 15:36:21 +0000 (11:36 -0400)
committerThan McIntosh <thanm@google.com>
Mon, 21 Mar 2022 17:14:08 +0000 (17:14 +0000)
commit627d6d6d5542a1ccf956a16608b0bc820568c09b
tree30669fcbcb345d9682ac766efc316503aee1322d
parent3f8a6941553ae007638335cb6af0b6a702adf64f
debug/dwarf: better error detection in parseUnits

Tweak the (*Data).parseUnits method to check a bit more carefully for
buffer read errors, so as to avoid infinite looping on malformed
inputs.

Fixes #51758.
Updates #47653.

Change-Id: I6d67fcb53392acf651ceec636789ab9e49ad5a5c
Reviewed-on: https://go-review.googlesource.com/c/go/+/393874
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Than McIntosh <thanm@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/debug/dwarf/buf.go
src/debug/dwarf/entry_test.go
src/debug/dwarf/unit.go