Re: [PATCH 4/6] Bluetooth: Refactor UUID-16 list generation into its own function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 24, 2013 at 4:21 PM, Anderson Lizardo
<anderson.lizardo@xxxxxxxxxxxxx> wrote:
> Hi Johan,
>
> On Thu, Jan 24, 2013 at 3:03 PM, Johan Hedberg <johan.hedberg@xxxxxxxxx> wrote:
>> +static u8 *create_uuid16_list(struct hci_dev *hdev, u8 *data, ptrdiff_t len)
>> +{
>> +       u8 *ptr = data, *uuids_start = NULL;
>> +       struct bt_uuid *uuid;
>
> Maybe you should check for "len < 2" here?

Actually, "len < 4", to be able to fit at least a 16-bit UUID.

-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux