summaryrefslogtreecommitdiff
path: root/attrib/gatttool.c
diff options
context:
space:
mode:
Diffstat (limited to 'attrib/gatttool.c')
-rw-r--r--attrib/gatttool.c4
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