patch a crash on incomplete supplied UserIP2

This commit is contained in:
mappu 2017-02-11 13:55:20 +13:00
parent f8c0fc54d8
commit b8122710f5

View File

@ -253,6 +253,11 @@ func (this *HubConnection) processProtocolMessage(message string) {
nextIPPair: nextIPPair:
for _, pair := range pairs { for _, pair := range pairs {
parts := strings.SplitN(pair, " ", 2) parts := strings.SplitN(pair, " ", 2)
if len(parts) != 2 {
// ????
continue nextIPPair
}
ip2nick := parts[0] ip2nick := parts[0]
ip2addr := parts[1] ip2addr := parts[1]