summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPriti Aghera <paghera@broadcom.com>2012-06-14 16:54:01 -0700
committerMatthew Xie <mattx@google.com>2012-07-14 11:19:23 -0700
commit757a3d1d2ccd0b14a7b14b9883ce7a9a254b7dc8 (patch)
tree4acdce0c2d4ecda69c3d2f17c12de686bec5f375
parent8e469244c3df905f69183098bac204c776936e6b (diff)
downloadexternal_bluetooth_bluedroid-757a3d1d2ccd0b14a7b14b9883ce7a9a254b7dc8.zip
external_bluetooth_bluedroid-757a3d1d2ccd0b14a7b14b9883ce7a9a254b7dc8.tar.gz
external_bluetooth_bluedroid-757a3d1d2ccd0b14a7b14b9883ce7a9a254b7dc8.tar.bz2
Fixed rename issue
Unknow characters were added while storing adapter name to storage sonetimes Change-Id: I081942cfb7be93cdbe0f5cd3d9fc9edef333a794
-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: