Skip to content

Commit

Permalink
This full fill all the new memory with zeroes.
Browse files Browse the repository at this point in the history
  • Loading branch information
hahnnicholas committed Nov 27, 2024
1 parent 85225e1 commit 63eaf5b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/osdp_cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1399,6 +1399,7 @@ static int cp_add_pd(struct osdp *ctx, int new_num_pd, const osdp_pd_info_t *new
LOG_PRINT("Failed to allocate new osdp_pd[] context");
return -1;
}
bzero(&ctx->pd[sizeof(struct osdp_pd) * old_num_pd], sizeof(struct osdp_pd) * new_num_pd);

ctx->pd = new_pd_array;
ctx->_num_pd = old_num_pd + new_num_pd;
Expand Down

0 comments on commit 63eaf5b

Please sign in to comment.