edited recv_tcp_packet to throw CorruptedPacketException if
packet.data.length is too short.