Skip to content

Commit

Permalink
Fixed potential zero size memory allocation in the cmd_replace_all fu…
Browse files Browse the repository at this point in the history
…nction
  • Loading branch information
proh14 authored and adsr committed Nov 15, 2024
1 parent 36d1255 commit 3e2654c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@ int cmd_replace_all(cmd_context_t *ctx) {
regex = NULL;
replacement = NULL;
CDL_COUNT2(ctx->editor->all_bviews, bview, num_bviews, all_next);
if (num_bviews <= 0) return MLE_OK;
buffer_done = calloc(num_bviews, sizeof(buffer_t *));
buffer_done_i = 0;

Expand Down

0 comments on commit 3e2654c

Please sign in to comment.