components/bt: Fix the different size of name buffer allocation size(backport 3.1)
authorbaohongde <baohongde@espressif.com>
Wed, 31 Oct 2018 02:56:16 +0000 (10:56 +0800)
committerbaohongde <baohongde@espressif.com>
Wed, 31 Oct 2018 02:56:16 +0000 (10:56 +0800)
A cherry-pick of MR !3587
Close https://github.com/espressif/esp-idf/issues/2615

components/bt/bluedroid/btc/profile/std/spp/btc_spp.c

index b28d8cf58c40a9202bcffa39d9185acb859c13e9..45cceb1d95fcdf6f6c5efdcb71891124f38a6297 100644 (file)
@@ -52,7 +52,7 @@ typedef struct {
     list_t *list;
     list_t *incoming_list;
     uint8_t service_uuid[16];
-    char service_name[ESP_SPP_SERVER_NAME_MAX];
+    char service_name[ESP_SPP_SERVER_NAME_MAX + 1];
 } spp_slot_t;
 
 static struct spp_local_param_t {