diff options
author | Anderson Lizardo <anderson.lizardo@openbossa.org> | 2014-01-11 00:47:26 -0400 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2014-01-11 18:56:03 +0200 |
commit | cceb59d76b24c477c2ab120cd8e9803b6e352c57 (patch) | |
tree | 61c76c21b3c0e23695496f0d4537cd7d23bce13a /attrib/att.c | |
parent | 88cdd5749c491ea26c080f79e1ac5b76b711f32b (diff) | |
download | bluez-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/att.c')
-rw-r--r-- | attrib/att.c | 2 |
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) |