From 019a32c75bec7878acfd965581949568a541e2d1 Mon Sep 17 00:00:00 2001 From: Paul Szczeanek Date: Wed, 19 Aug 2020 10:41:05 +0100 Subject: [PATCH] no need to check again --- .../ble-api-implementation/source/GattServerImpl.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/connectivity/FEATURE_BLE/libraries/ble-api-implementation/source/GattServerImpl.cpp b/connectivity/FEATURE_BLE/libraries/ble-api-implementation/source/GattServerImpl.cpp index 38c7d7723e..a661c7e6f0 100644 --- a/connectivity/FEATURE_BLE/libraries/ble-api-implementation/source/GattServerImpl.cpp +++ b/connectivity/FEATURE_BLE/libraries/ble-api-implementation/source/GattServerImpl.cpp @@ -994,9 +994,7 @@ uint8_t GattServer::atts_write_cb( /* we don't write anything during the prepare phase */ bool write_happened = (operation != ATT_PDU_PREP_WRITE_REQ); - if (len > pAttr->maxLen) { - return ATT_ERR_LENGTH; - } + MBED_ASSERT(len + offset <= pAttr->maxLen); if (write_happened) { WsfTaskLock();