ammario / ipisp

Query IP address network information in Go
MIT License
66 stars 13 forks source link

Fix possible index out of range condition in LookupIP() #3

Closed Freeaqingme closed 8 years ago

Freeaqingme commented 8 years ago

Although I'm not able to reproduce it or be able to explain it, I got this stack trace. Figured I might as well prevent it.

panic: runtime error: index out of range

goroutine 70 [running]: panic(0xd1d140, 0xc820010120) /opt/go/src/runtime/panic.go:464 +0x3e6 github.com/ammario/ipisp.(*Client).LookupIP(0xc8202a6480, 0xc82025a8d0, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) /home/dolf/Projects/Cluegetter/src/github.com/ammario/ipisp/client.go:157 +0x110