[Suspected Bug] Corner case in split_buffered_packet
I think that in the code above, the condition count > 1 should be changed to count >= 1. If the capacity of the new packet is 1 greater than that of the old packet (which is possible), then there's no need to split the old packet into two.
I encountered the above case in the test, which caused a disconnection.
Please check it !!!
Can it be easily reproduced? I wonder why it happens. What frames are in the packet to be split? Maybe the split_lost_packet() should be avoided if it does not ending up splitting a packet.
It returned here in lsquic_packet_resize_next when second lsquic_packet_resize_next loop.
Not easily reproducible, no split error occurred.
Thank you for the bug report.
Fixed