[GH-ISSUE #36] Crosspost: https://github.com/goodhosts/hostsfile/issues/39 #19

Closed
opened 2026-03-02 05:09:14 +03:00 by kerem · 1 comment
Owner

Originally created by @yunginnanet on GitHub (May 18, 2022).
Original GitHub issue: https://github.com/goodhosts/cli/issues/36

See https://github.com/goodhosts/hostsfile/issues/39

[...]

hosts r ff00::0

Version[s] reproduced with

(Using goodhosts/cli in all cases)

* [x]  Vendored copy that comes with [goodhosts/cli](https://github.com/goodhosts/cli)

* [x]  Latest release

* [x]  Main branch

[...]

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/hostsfile@v0.1.1/hosts.go:390
github.com/goodhosts/hostsfile.(*Hosts).RemoveByIp(0xc0002f0770, {0x7fff5401b761?, 0x660254?})
	/home/kayos/go/pkg/mod/github.com/goodhosts/hostsfile@v0.1.1/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/v2@v2.6.0/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/v2@v2.6.0/app.go:313 +0xb48
github.com/urfave/cli/v2.(*App).Run(...)
	/home/kayos/go/pkg/mod/github.com/urfave/cli/v2@v2.6.0/app.go:224
main.main()
	/home/kayos/Workshop/goodhosts/cli/main.go:59 +0x414

I believe the issue primarily exists in this tool.

Originally created by @yunginnanet on GitHub (May 18, 2022). Original GitHub issue: https://github.com/goodhosts/cli/issues/36 # See https://github.com/goodhosts/hostsfile/issues/39 [...] > `hosts r ff00::0` > ### Version[s] reproduced with > > _(Using [goodhosts/cli](https://github.com/goodhosts/cli) in all cases)_ > > * [x] Vendored copy that comes with [goodhosts/cli](https://github.com/goodhosts/cli) > > * [x] Latest release > > * [x] Main branch [...] > ``` > 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/hostsfile@v0.1.1/hosts.go:390 > github.com/goodhosts/hostsfile.(*Hosts).RemoveByIp(0xc0002f0770, {0x7fff5401b761?, 0x660254?}) > /home/kayos/go/pkg/mod/github.com/goodhosts/hostsfile@v0.1.1/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/v2@v2.6.0/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/v2@v2.6.0/app.go:313 +0xb48 > github.com/urfave/cli/v2.(*App).Run(...) > /home/kayos/go/pkg/mod/github.com/urfave/cli/v2@v2.6.0/app.go:224 > main.main() > /home/kayos/Workshop/goodhosts/cli/main.go:59 +0x414 > ``` ### **I believe the issue primarily exists in this tool.**
kerem closed this issue 2026-03-02 05:09:14 +03:00
Author
Owner

@luthermonson commented on GitHub (Sep 30, 2023):

fixed by #37

<!-- gh-comment-id:1741817105 --> @luthermonson commented on GitHub (Sep 30, 2023): fixed by #37
Sign in to join this conversation.
No labels
bug
bug
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cli#19
No description provided.