Skip to content

Commit

Permalink
ble_mesh: stack: Fix endianness error in output or input oob data of …
Browse files Browse the repository at this point in the history
…number

Closes #6862
  • Loading branch information
JiaLWang committed Apr 20, 2021
1 parent 4f04f48 commit bdce35c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/bt/esp_ble_mesh/mesh_core/provisioner_prov.c
Original file line number Diff line number Diff line change
Expand Up @@ -2057,7 +2057,7 @@ int bt_mesh_provisioner_set_oob_input_data(const uint8_t idx, const uint8_t *val
memset(link[idx].auth, 0, 16);
if (num_flag) {
/* Provisioner inputs number */
memcpy(link[idx].auth + 12, val, sizeof(uint32_t));
sys_memcpy_swap(link[idx].auth + 12, val, sizeof(uint32_t));
} else {
/* Provisioner inputs string */
memcpy(link[idx].auth, val, link[idx].auth_size);
Expand Down Expand Up @@ -2094,7 +2094,7 @@ int bt_mesh_provisioner_set_oob_output_data(const uint8_t idx, const uint8_t *nu
if (num_flag) {
/* Provisioner output number */
memset(link[idx].auth, 0, 16);
memcpy(link[idx].auth + 16 - size, num, size);
sys_memcpy_swap(link[idx].auth + 16 - size, num, size);
} else {
/* Provisioner output string */
memset(link[idx].auth, 0, 16);
Expand Down

0 comments on commit bdce35c

Please sign in to comment.