summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbtif/src/btif_storage.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/btif/src/btif_storage.c b/btif/src/btif_storage.c
index abb224c..ea233b1 100755
--- a/btif/src/btif_storage.c
+++ b/btif/src/btif_storage.c
@@ -420,7 +420,8 @@ static bt_status_t btif_in_property_to_str(bt_property_t *property, char *value)
case BT_PROPERTY_BDNAME:
case BT_PROPERTY_REMOTE_FRIENDLY_NAME:
{
- strcpy(value, (char*)property->val);
+ strncpy(value, (char*)property->val, property->len);
+ value[property->len]='\0';
}break;
case BT_PROPERTY_ADAPTER_SCAN_MODE:
case BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT: