Check len parameter before calling UDP receive functions to avoid unexpected uint16_t cast results