[PATCH BlueZ 10/11] attrib: Fix PDU length check for Read by Type Request

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

 



PDU length must be either 7 or 21 octets.
---
 attrib/att.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/attrib/att.c b/attrib/att.c
index c279b2c..183390b 100644
--- a/attrib/att.c
+++ b/attrib/att.c
@@ -400,7 +400,7 @@ uint16_t dec_read_by_type_req(const uint8_t *pdu, size_t len, uint16_t *start,
 	if (start == NULL || end == NULL || uuid == NULL)
 		return 0;
 
-	if (len < min_len + 2)
+	if (len != (min_len + 2) && len != (min_len + 16))
 		return 0;
 
 	if (pdu[0] != ATT_OP_READ_BY_TYPE_REQ)
-- 
1.8.3.2

--
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