modutil_get_complete_packets was assuming that at least 3 bytes of each packet is available. This results in an out-of-bounds read if less than 3 bytes of data for a partial result set is available.