Merge pull request #3623 from actiontech/3.20.07.99/lts_inner_2121

fix ArrayIndexOutOfBoundException using big packet (cherry pick from #2659)
This commit is contained in:
wenyh
2023-02-28 13:36:50 +08:00
committed by GitHub

View File

@@ -143,7 +143,7 @@ public class CommandPacket extends MySQLPacket {
remain = 0;
} else {
int start = arg.length - remain;
int available = buffer.limit() - buffer.position();
int available = (MySQLPacket.MAX_PACKET_SIZE + MySQLPacket.PACKET_HEADER_SIZE) - buffer.position();
buffer.put(arg, start, available);
remain -= available;
}