mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2025-01-25 05:43:33 +08:00
mgmtops: Check for exact mgmt_device_found event size
This commit is contained in:
parent
42a03e1c6f
commit
4d155a809b
@ -1244,8 +1244,9 @@ static void mgmt_device_found(int sk, uint16_t index, void *buf, size_t len)
|
||||
uint8_t *eir;
|
||||
uint32_t cls;
|
||||
|
||||
if (len < sizeof(*ev)) {
|
||||
error("Too small mgmt_device_found event packet");
|
||||
if (len != sizeof(*ev)) {
|
||||
error("mgmt_device_found length %u instead of expected %u",
|
||||
len, sizeof(*ev));
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user