[PATCH v2 06/11] packet: Avoid integer overflows in packet_get_do()