nictuku / dht

Kademlia/Mainline DHT node in Go.
Other
826 stars 144 forks source link

crash in nodesForInfoHash() #8

Closed nictuku closed 11 years ago

nictuku commented 11 years ago

panic: runtime error: slice bounds out of range

goroutine 18 [running]: github.com/nictuku/nettools.DottedPortToBinary(0xc200e0f5a0, 0x1c, 0x1c, 0xc200ece978) /home/nictuku/src/github.com/nictuku/nettools/addresses.go:25 +0x404 github.com/nictuku/dht.(_DHT).nodesForInfoHash(0xc20010f380, 0xc200e15f40, 0x14, 0x0, 0x0, ...) /home/nictuku/src/github.com/nictuku/dht/dht.go:525 +0x17a github.com/nictuku/dht.(_DHT).replyGetPeers(0xc20010f380, 0xc200e20840, 0xc200ece600, 0x4, 0xc200ece748, ...) /home/nictuku/src/github.com/nictuku/dht/dht.go:515 +0x62d github.com/nictuku/dht.(_DHT).processPacket(0xc20010f380, 0xc20081d000, 0x6a, 0x1000, 0xc200e20840, ...) /home/nictuku/src/github.com/nictuku/dht/dht.go:383 +0x1449 github.com/nictuku/dht.(_DHT).DoDHT(0xc20010f380) /home/nictuku/src/github.com/nictuku/dht/dht.go:252 +0x8f4 created by main.main /home/nictuku/src/github.com/nictuku/magnets/supernode/main.go:119 +0x8d9