Skip to content

Crashing because of runtime error: slice bounds out of range #1

Description

@dilipgup

stack trace:

panic: runtime error: slice bounds out of range

goroutine 195 [running]:
panic(0x100f260, 0x1b20870)
/var/tmp/godownload/install/go/src/runtime/panic.go:551 +0x3c1 fp=0xc4210ec210 sp=0xc4210ec170 pc=0x43d331
runtime.panicslice()
/var/tmp/godownload/install/go/src/runtime/panic.go:35 +0x5e fp=0xc4210ec230 sp=0xc4210ec210 pc=0x43c04e
arubanetworks.com/vendor/github.com/kkdai/consistent.(*ConsistentHashing).hasKey(0xc420438d50, 0xc420daa770, 0x64, 0x0)
github.com/kkdai/consistent/consistent.go:126 +0x9e fp=0xc4210ec268 sp=0xc4210ec230 pc=0xd0b57e
arubanetworks.com/vendor/github.com/kkdai/consistent.(*ConsistentHashing).searchNearRingIndex(0xc420438d50, 0xc420daa770, 0x64, 0x422ba9)
github.com/kkdai/consistent/consistent.go:99 +0x43 fp=0xc4210ec2b0 sp=0xc4210ec268 pc=0xd0b293
arubanetworks.com/vendor/github.com/kkdai/consistent.(*ConsistentHashing).Get(0xc420438d50, 0xc420daa770, 0x64, 0xc4210ec368, 0x48252c, 0x1b22010, 0xc420468900)
github.com/kkdai/consistent/consistent.go:42 +0xba fp=0xc4210ec2e8 sp=0xc4210ec2b0 pc=0xd0ac3a

it's because of hasKey don't hvae protection against strings larger than 64 bytes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions