Bluetooth: Mesh: fix le addr string overflow

le addr string arry overflow

Signed-off-by: YanBiao Hao <haoyanbiao@xiaomi.com>
This commit is contained in:
YanBiao Hao 2022-07-29 14:46:48 +08:00 committed by Carles Cufí
commit e1e366c912

View file

@ -2916,7 +2916,7 @@ enum bt_security_err pairing_accept(
void bond_deleted(uint8_t id, const bt_addr_le_t *peer) void bond_deleted(uint8_t id, const bt_addr_le_t *peer)
{ {
char addr[BT_ADDR_STR_LEN]; char addr[BT_ADDR_LE_STR_LEN];
bt_addr_le_to_str(peer, addr, sizeof(addr)); bt_addr_le_to_str(peer, addr, sizeof(addr));
shell_print(ctx_shell, "Bond deleted for %s, id %u", addr, id); shell_print(ctx_shell, "Bond deleted for %s, id %u", addr, id);