Bluetooth: Fix NULL pointer deference on eir_get_service_data
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 5 Jun 2025 15:14:25 +0000 (11:14 -0400)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 11 Jun 2025 19:59:07 +0000 (15:59 -0400)
commit20a2aa01f5aeb6daad9aeaa7c33dd512c58d81eb
treea5e134538733856bc1e60f078ea77637862e7bf4
parent260388f79e94fb3026c419a208ece8358bb7b555
Bluetooth: Fix NULL pointer deference on eir_get_service_data

The len parameter is considered optional so it can be NULL so it cannot
be used for skipping to next entry of EIR_SERVICE_DATA.

Fixes: 8f9ae5b3ae80 ("Bluetooth: eir: Add helpers for managing service data")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/eir.c