Closed aynakeya closed 1 week ago
When does the length of a packet become 0? Could you provide some detailed scenarios? If Bilibili returns a packet with a length of 0, I think it is necessary to add extra error handling in this function.
tbh, I have no idea when/how the packLen become 0. I found it only because one of user's program crashed and he sent me the error log. It seems to be very rare case? I haven't encouter it myself, nor can i reproduce it.
yeah. I think it would be good to have a length check before accessing it.
NewPacketFromBytes
should return an empty packet, ifpackLen
is 0 or does not match the length of the data?error trace from user