HciManager::handleLeMetaEvent(): check size before accessing the data


The function was only taking a pointer to the data buffer and accesing
it without actually making sure that it has enough meaningful bytes.

Pass the actual buffer size as a second parameter to the function.
Print a warning and exit early if there is not enough bytes to parse
the data.

As in other commits, this cannot be considered a security issue,
because the provided buffer is pre-allocated on the stack, and it has
enough bytes to avoid reading past the end of the buffer. In worst
case we could get garbage data from the buffer.

Pick-to: 6.9 6.8 6.5
Change-Id: I67cd40e4644beac19ccf2a5fd531469ae951a49e
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
commit32ca71d6cca413c4521728b524d50d4e76572639
parenta5478a541c4ee11704800c8cb5f6f687682819a3
authorIvan Solovev <ivan.solovev@qt.io>
committerIvan Solovev <ivan.solovev@qt.io>
commit timeWed, 21 May 2025 18:21:04 +0200