Fix segfault on specially crafted packet.