QLowEnergyControllerPrivateAndroid: use jsize when allocating buffers


QByteArray uses qsizetype to represent its length, which is 64-bit on
most of the supported platforms.
JNI interface, however, uses jsize (which is same as jint - 32-bit) to
represent its dynamically allocated buffers.

This commit makes sure that we avoid signed integer overflows when
allocating Java buffers using JNI, by properly truncating qsizetype
to jsize.

Note that the pre-existing behavior shouldn't be a problem in
practice, as it's impossible to have 2GB characteristic or descriptor
value.

Pick-to: 6.9 6.8 6.5
Change-Id: I4e8ed56b3d3cafe81302d150aed048694c3f036d
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
commitcd5a362aeeb18be16a69c9e6871a9c441c4cdb6f
parent96d8304092f47e26106976eb35bca5a5fbc706b9
authorIvan Solovev <ivan.solovev@qt.io>
committerIvan Solovev <ivan.solovev@qt.io>
commit timeFri, 23 May 2025 17:12:22 +0200