Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce0e4910 authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

Fix advertise data length parsing

Bluetooth 5 advertise data can be longer than 128bytes. The length bit
must be properly converted to unsigned value for such long data.

Bug: 36086416
Test: manual
Change-Id: I7449ea99be2e78dd60dd90ec607b74f2bb02d213
parent ecd86bf5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2311,7 +2311,7 @@ public class GattService extends ProfileService {

        int offset = 0;
        while(offset < (adv_data.length-2)) {
            int len = adv_data[offset++];
            int len = Byte.toUnsignedInt(adv_data[offset++]);
            if (len == 0) break;

            int type = adv_data[offset++];