fix too small buffer
property_get must be called with a buffer of at least
PROPERTY_VALUE_MAX len. The supplied buffer is too small.
Fixed.
Change-Id: I6c6b3050b30f6aa5ece69888263394e572551aff
diff --git a/btif/src/btif_dm.c b/btif/src/btif_dm.c
index 5517f55..ccfb271 100755
--- a/btif/src/btif_dm.c
+++ b/btif/src/btif_dm.c
@@ -1751,7 +1751,7 @@
#ifdef BTIF_DM_OOB_TEST
void btif_dm_load_local_oob(void)
{
- char prop_oob[32];
+ char prop_oob[PROPERTY_VALUE_MAX];
property_get("service.brcm.bt.oob", prop_oob, "3");
BTIF_TRACE_DEBUG1("btif_dm_load_local_oob prop_oob = %s",prop_oob);
if (prop_oob[0] != '3')
@@ -1775,7 +1775,7 @@
char *path_a = "/data/misc/bluedroid/LOCAL/a.key";
char *path_b = "/data/misc/bluedroid/LOCAL/b.key";
char *path = NULL;
- char prop_oob[32];
+ char prop_oob[PROPERTY_VALUE_MAX];
BTIF_TRACE_DEBUG1("btif_dm_proc_loc_oob: valid=%d", valid);
if (oob_cb.sp_c[0] == 0 && oob_cb.sp_c[1] == 0 &&
oob_cb.sp_c[2] == 0 && oob_cb.sp_c[3] == 0 &&
@@ -1814,7 +1814,7 @@
char *path_a = "/data/misc/bluedroid/LOCAL/a.key";
char *path_b = "/data/misc/bluedroid/LOCAL/b.key";
char *path = NULL;
- char prop_oob[32];
+ char prop_oob[PROPERTY_VALUE_MAX];
BOOLEAN result = FALSE;
bt_bdaddr_t bt_bd_addr;
bdcpy(oob_cb.oob_bdaddr, bd_addr);