summaryrefslogtreecommitdiff
path: root/attrib
diff options
context:
space:
mode:
authorAnderson Lizardo <anderson.lizardo@openbossa.org>2014-01-11 00:47:26 -0400
committerJohan Hedberg <johan.hedberg@intel.com>2014-01-11 18:56:03 +0200
commitcceb59d76b24c477c2ab120cd8e9803b6e352c57 (patch)
tree61c76c21b3c0e23695496f0d4537cd7d23bce13a /attrib
parent88cdd5749c491ea26c080f79e1ac5b76b711f32b (diff)
downloadbluez-cceb59d76b24c477c2ab120cd8e9803b6e352c57.tar.gz
attrib: Fix PDU length check for Read by Type Request
PDU length must be either 7 or 21 octets.
Diffstat (limited to 'attrib')
-rw-r--r--attrib/att.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/attrib/att.c b/attrib/att.c
index c279b2ce4..183390b5b 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)