]> Cypherpunks repositories - gostls13.git/commit
cmd/link/internal/loadpe: fix xrels search "not found" detection
authorDavis Goodin <dagood@microsoft.com>
Thu, 16 Nov 2023 18:20:56 +0000 (10:20 -0800)
committerQuim Muntal <quimmuntal@gmail.com>
Thu, 16 Nov 2023 20:37:59 +0000 (20:37 +0000)
commita95c5d37f256d2c3fb462b3e0e544bef39f83f7c
tree5fd7e0f2dc326efc8f79a3a36c744d1f353fd527
parent3f04f959d2d8bba0b636aa0c4ac705ae29e2c7b0
cmd/link/internal/loadpe: fix xrels search "not found" detection

Fixes findHandlerInXDataAMD64 to handle the return value of sort.Search
when the search fails to find anything. Otherwise, the value may later
be used as an index, causing an out of range error.

Fixes #64200

Change-Id: I4f92e76b3f4d4d5dbe5cbc707f808298c580afe1
Reviewed-on: https://go-review.googlesource.com/c/go/+/543076
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Run-TryBot: Quim Muntal <quimmuntal@gmail.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Quim Muntal <quimmuntal@gmail.com>
src/cmd/link/internal/loadpe/seh.go