From fc62b25e9ef6436941fa388cbdcc547315cd1d80 Mon Sep 17 00:00:00 2001 From: Marcin Kraglak Date: Thu, 22 May 2014 12:33:55 +0200 Subject: [PATCH] android/gatt: Don't process read_by_type request with invalied range Return ATT_ECODE_INVALID_HANDLE if range is incorrect. It repairs TC_GAR_SR_BI_08_C test case. --- android/gatt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/android/gatt.c b/android/gatt.c index 210058ba6..772c253d8 100644 --- a/android/gatt.c +++ b/android/gatt.c @@ -4394,6 +4394,9 @@ static uint8_t read_by_type(const uint8_t *cmd, uint16_t cmd_len, if (!len) return ATT_ECODE_INVALID_PDU; + if (start > end) + return ATT_ECODE_INVALID_HANDLE; + q = queue_new(); if (!q) return ATT_ECODE_INSUFF_RESOURCES; -- 2.47.3