Fix access to invalid data on reception of packet with size 0