Fix buffer overflow in chat server example