-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Description
Mind you, these entries were found in the wild with bone stock Proxmox installs. This was while using the remove command.
goodhosts/cli Command
hosts r ff00::0
Version[s] reproduced with
(Using goodhosts/cli in all cases)
- Vendored copy that comes with goodhosts/cli
- Latest release
- Main branch
Excerpt of problematic IPv6 entries:
(ignore first line, it's only for context)
[::1 ip6-localhost ip6-loopback]
fe00::0
ff00::0
ff02::1
ff02::2
ff02::3
Stack Trace:
removing ip ff00::0
panic: runtime error: slice bounds out of range [5:3]
goroutine 1 [running]:
github.com/goodhosts/hostsfile.(*Hosts).removeByPosition(...)
/home/kayos/go/pkg/mod/github.com/goodhosts/[email protected]/hosts.go:390
github.com/goodhosts/hostsfile.(*Hosts).RemoveByIp(0xc0002f0770, {0x7fff5401b761?, 0x660254?})
/home/kayos/go/pkg/mod/github.com/goodhosts/[email protected]/hosts.go:282 +0x1ff
github.com/goodhosts/cli/cmd.processSingleArg(0xc00029fae8?, {0x7fff5401b761, 0x7})
/home/kayos/Workshop/goodhosts/cli/cmd/remove.go:97 +0xa9
github.com/goodhosts/cli/cmd.remove(0xc0002ee500)
/home/kayos/Workshop/goodhosts/cli/cmd/remove.go:45 +0x145
github.com/urfave/cli/v2.(*Command).Run(0xc0001aab40, 0xc0002ee340)
/home/kayos/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:163 +0x5bb
github.com/urfave/cli/v2.(*App).RunContext(0xc0001a4d00, {0x6c90d8?, 0xc0000140b0}, {0xc000010180, 0x3, 0x3})
/home/kayos/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:313 +0xb48
github.com/urfave/cli/v2.(*App).Run(...)
/home/kayos/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:224
main.main()
/home/kayos/Workshop/goodhosts/cli/main.go:59 +0x414
Other Thoughts
I started trying to trace this out but I'm not sure exactly where to fix this yet. I'll try to take a look when I have more time.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels