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