Fix size inconsistencies in QBluetoothSocketPrivateDarwin::readChannelData()


The function takes the size as std::size_t, but later casts it to int
in the rxBuffer.reserve() call.
However, later on it uses unmodified size to copy the data into the
allocated space.

This can lead to write past the end of the buffer if the input data
size exceeds INT_MAX. However, I do not think that it's possible in
practice, because the data is sent over bluetooth in chunks of MTU
size, where the MTU cannot exceed 512 bytes.

Amends c1286c3a344593c79feced5c782ff85bca80bfff that added the case
in the reserve() call.

Pick-to: 6.9 6.8 6.5
Change-Id: I7fe3f19f343f5b80bb939c5ef8c6c1bb1c0068fc
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
commit8429cd348e3747d97d6639687586a63170e296e4
parent8c7298dc51210ea8c827269083136d77b01a46c9
authorIvan Solovev <ivan.solovev@qt.io>
committerIvan Solovev <ivan.solovev@qt.io>
commit timeThu, 22 May 2025 17:46:16 +0200