BUG/MINOR: peers: Fix peers data decoding issue

This error led to truncated data after decoding upon receipt.
It's specific to peers v2 and needs to be backported to 1.6.
This commit is contained in:
Frdric Lcaille 2016-07-19 14:04:36 +02:00 committed by Willy Tarreau
parent e4edc6b628
commit 22fc3203db

View File

@ -225,7 +225,7 @@ uint64_t intdecode(char **str, char *end) {
}
i += (uint64_t)msg[idx] << (4 + 7*(idx-1));
}
while (msg[idx] > 128);
while (msg[idx] >= 128);
*str = (char *)&msg[idx+1];
return i;
}