[PATCH BlueZ 05/11] attrib: Fix PDU length check for Read by Group 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 a8f641a..472c25c 100644
--- a/attrib/att.c
+++ b/attrib/att.c
@@ -161,7 +161,7 @@ uint16_t dec_read_by_grp_req(const uint8_t *pdu, size_t len, uint16_t *start,
 	if (pdu[0] != ATT_OP_READ_BY_GROUP_REQ)
 		return 0;
 
-	if (len < min_len + 2)
+	if (len != (min_len + 2) && len != (min_len + 16))
 		return 0;
 
 	*start = att_get_u16(&pdu[1]);
-- 
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