Skip to content

Commit

Permalink
nimble/host: Change 'move_count' to uint8_t type to prevent out-of-bo…
Browse files Browse the repository at this point in the history
…unds errors
  • Loading branch information
darshandobariya7 committed Feb 14, 2024
1 parent d84b41e commit e2096f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nimble/host/store/config/src/ble_store_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ ble_store_config_delete_obj(void *values, int value_size, int idx,
{
uint8_t *dst;
uint8_t *src;
int move_count;
uint8_t move_count;

(*num_values)--;
if (idx < *num_values) {
Expand Down
2 changes: 1 addition & 1 deletion nimble/host/store/ram/src/ble_store_ram.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ ble_store_ram_delete_obj(void *values, int value_size, int idx,
{
uint8_t *dst;
uint8_t *src;
int move_count;
uint8_t move_count;

(*num_values)--;
if (idx < *num_values) {
Expand Down

0 comments on commit e2096f3

Please sign in to comment.