Skip to content

Commit 99708cd

Browse files
alxelaxrlubos
authored andcommitted
[nrf fromtree] bluetooth: mesh: zeroing not used part of auth array
Commit set zero to not used part of authentication array to prevent garbage from the previous provisioning using. Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no> (cherry picked from commit 760d190) Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
1 parent b1efa71 commit 99708cd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

subsys/bluetooth/mesh/prov.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ int bt_mesh_input_string(const char *str)
293293
}
294294

295295
memcpy(bt_mesh_prov_link.auth, str, strlen(str));
296+
memset(bt_mesh_prov_link.auth + size, 0, sizeof(bt_mesh_prov_link.auth) - size);
296297

297298
bt_mesh_prov_link.role->input_complete();
298299

0 commit comments

Comments
 (0)