diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2010-10-05 13:50:03 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2010-10-05 13:50:03 +0200 |
commit | 89c9634c10f3eb73c577d001e943e46d4fb13302 (patch) | |
tree | c8fc22e1b44e08f6ca371991aed127758493c104 /attrib | |
parent | 77bce046cb2387b2c2ed7757ab5c37fa1a6a4766 (diff) | |
download | bluez-89c9634c10f3eb73c577d001e943e46d4fb13302.tar.gz |
gatttool: fix trying to read beyond the last handle
Diffstat (limited to 'attrib')
-rw-r--r-- | attrib/gatttool.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/attrib/gatttool.c b/attrib/gatttool.c index 4a6634094..76fe62c01 100644 --- a/attrib/gatttool.c +++ b/attrib/gatttool.c @@ -183,6 +183,10 @@ static void primary_cb(guint8 status, const guint8 *pdu, guint16 plen, att_data_list_free(list); + /* Don't go beyond the maximum handle value */ + if (end == 0xffff) + goto done; + /* * Discover all primary services sub-procedure shall send another * Read by Group Type Request until Error Response is received and |