Re: [PATCH] Bluetooth: add timeout sanity check to hci_inquiry

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

 



On 8/19/21 6:05 PM, Marcel Holtmann wrote:
Hi Pavel,

	}


	/* Restrict maximum inquiry length to 60 seconds */
	if (ir.length > 60) {
		..
	}

+	if (ir.length > HCI_INQUIRY_MAX_TIMEOUT) {
+		err = -EINVAL;
+		goto done;
+	}
+

I found this easier to read than adding anything define somewhere else. And since this is a legacy interface that is no longer used by bluetoothd, this should be fine. We will start to deprecate this eventually.

And I prefer 1 minute max time here. Just to be safe.


I thought, that user-space should be aware of maximum value, that's why I decided to add this define :) I didn't know, that this interface is legacy.

Will fix in v2, thank you!


With regards,
Pavel Skripkin



[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