Fixed buffer overflow in Connection