]> Cypherpunks repositories - gostls13.git/commit
debug/pe: avoid panic in File.ImportedSymbols
authorAlex Brainman <alex.brainman@gmail.com>
Tue, 24 Jun 2025 05:18:28 +0000 (15:18 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Tue, 23 Dec 2025 03:38:37 +0000 (19:38 -0800)
commit2cd0371a0a61e0dec6034239b1a92a20968c8522
tree406d9794e9bb68a3d3b884892a090793c7af37a4
parent91435be1531727f3220a8fdebb7e4894f39edb41
debug/pe: avoid panic in File.ImportedSymbols

This change skips symbols where dt.OriginalFirstThunk is less than
ds.VirtualAddress.

The variable types are uint32, and
(dt.OriginalFirstThunk-ds.VirtualAddress) becomes very large number when
dt.OriginalFirstThunk < ds.VirtualAddress.

Fixes #73548.
Fixes #76721.
Fixes #76724.

Change-Id: I72908bd0896003423aeb754fa0b6c72d452cdb4e
Reviewed-on: https://go-review.googlesource.com/c/go/+/684495
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/debug/pe/file.go