diff options
author | Ganesh Ganapathi Batta <ganeshg@broadcom.com> | 2012-08-02 17:38:48 -0700 |
---|---|---|
committer | Matthew Xie <mattx@google.com> | 2012-08-09 23:00:26 -0700 |
commit | 3d50b084b10de8feca0d9edb51fa69591de37a17 (patch) | |
tree | 9637e211364d0fe09f2183ab05d4f08eb5afc7ac /btif/src/btif_dm.c | |
parent | b7049f8573901ca12738fc47508a31ccb1de1c1c (diff) | |
download | external_bluetooth_bluedroid-3d50b084b10de8feca0d9edb51fa69591de37a17.zip external_bluetooth_bluedroid-3d50b084b10de8feca0d9edb51fa69591de37a17.tar.gz external_bluetooth_bluedroid-3d50b084b10de8feca0d9edb51fa69591de37a17.tar.bz2 |
Fix issue with passing wrong str len to java layer
Send only length of string to Java instead of length +1 from btif for
local Bluetooth name, Remote name and Friendly name for paired devices.
Change-Id: I4e822db62eb2affaadad283c6ceb2a368e3b107c
Diffstat (limited to 'btif/src/btif_dm.c')
-rwxr-xr-x[-rw-r--r--] | btif/src/btif_dm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/btif/src/btif_dm.c b/btif/src/btif_dm.c index 4b43b6a..32cb0d1 100644..100755 --- a/btif/src/btif_dm.c +++ b/btif/src/btif_dm.c @@ -308,7 +308,7 @@ static void btif_update_remote_properties(BD_ADDR bd_addr, BD_NAME bd_name, if (strlen((const char *) bd_name)) { BTIF_STORAGE_FILL_PROPERTY(&properties[num_properties], - BT_PROPERTY_BDNAME, strlen((char *)bd_name)+1, bd_name); + BT_PROPERTY_BDNAME, strlen((char *)bd_name), bd_name); status = btif_storage_set_remote_device_property(&bdaddr, &properties[num_properties]); ASSERTC(status == BT_STATUS_SUCCESS, "failed to save remote device name", status); num_properties++; @@ -1638,7 +1638,7 @@ bt_status_t btif_dm_get_adapter_property(bt_property_t *prop) { bt_bdname_t *bd_name = (bt_bdname_t*)prop->val; strcpy((char *)bd_name->name, (char *)BTM_DEF_LOCAL_NAME); - prop->len = strlen((char *)bd_name->name)+1; + prop->len = strlen((char *)bd_name->name); } break; |