You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ry...@apache.org on 2020/09/10 13:34:42 UTC

[mynewt-nimble] branch master updated: nimble host: Fix minor bug in ble_eddystone_set_adv_data_gen

This is an automated email from the ASF dual-hosted git repository.

rymek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
     new 9fd494f  nimble host: Fix minor bug in ble_eddystone_set_adv_data_gen
9fd494f is described below

commit 9fd494f730035e19374a2e6e8e81ec9e9e963b2a
Author: Prasad Alatkar <pr...@espressif.com>
AuthorDate: Wed Sep 9 12:54:31 2020 +0530

    nimble host: Fix minor bug in ble_eddystone_set_adv_data_gen
---
 nimble/host/src/ble_eddystone.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nimble/host/src/ble_eddystone.c b/nimble/host/src/ble_eddystone.c
index 7d80d13..eccb3e9 100644
--- a/nimble/host/src/ble_eddystone.c
+++ b/nimble/host/src/ble_eddystone.c
@@ -76,7 +76,7 @@ ble_eddystone_set_adv_data_gen(struct ble_hs_adv_fields *adv_fields,
     if (adv_fields->num_uuids16 > BLE_EDDYSTONE_MAX_UUIDS16) {
         return BLE_HS_EINVAL;
     }
-    if (svc_data_len > BLE_EDDYSTONE_MAX_SVC_DATA_LEN) {
+    if (svc_data_len > (BLE_EDDYSTONE_MAX_SVC_DATA_LEN - BLE_EDDYSTONE_SVC_DATA_BASE_SZ)) {
         return BLE_HS_EINVAL;
     }
     if (adv_fields->num_uuids16 > 0 && !adv_fields->uuids16_is_complete) {