-
Rhys Hiltner authored
When the linker was written in C, command line arguments were passed around as null-terminated byte arrays which encouraged checking characters one at a time. In Go, that can easily lead to out-of-bounds panics. Use the more idiomatic strings.HasPrefix when checking cmd/link's -B argument to avoid the panic, and replace the manual hex decode with use of the encoding/hex package. Fixes #14636 Change-Id: I45f765bbd8cf796fee1a9a3496178bf76b117827 Reviewed-on: https://go-review.googlesource.com/20211 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
3375974e
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
ar.go | ||
arch.go | ||
data.go | ||
decodesym.go | ||
dwarf.go | ||
dwarf_defs.go | ||
elf.go | ||
go.go | ||
ld.go | ||
ldelf.go | ||
ldmacho.go | ||
ldpe.go | ||
lib.go | ||
link.go | ||
macho.go | ||
macho_combine_dwarf.go | ||
mergestrings.go | ||
objfile.go | ||
pcln.go | ||
pe.go | ||
pobj.go | ||
sym.go | ||
symtab.go | ||
util.go |