Commit 6c0c331e4c8ff6c0f7fa6cc5fd08d853d6c579c4
Committed by
Gustavo Padovan
1 parent
84d9d0716b
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
Bluetooth: Check for minimum data length in eir_has_data_type()
If passed 0 as data_length the (parsed < data_length - 1) test will be true and cause a buffer overflow. In practice we need at least two bytes for the element length and type so add a test for it to the very beginning of the function. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
Showing 1 changed file with 3 additions and 0 deletions Side-by-side Diff