]> granicus.if.org Git - esp-idf/commitdiff
components/bt: Fix the different size of name buffer allocation size
authorbaohongde <baohongde@espressif.com>
Wed, 31 Oct 2018 02:48:47 +0000 (10:48 +0800)
committerbaohongde <baohongde@espressif.com>
Wed, 31 Oct 2018 09:39:31 +0000 (17:39 +0800)
Close https://github.com/espressif/esp-idf/issues/2615

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

index 1d764fcad3b2687242ec767a69857e81b45a349a..ad39ac75760192a99b27ff6a1bea7dd77e57392b 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 {