Skip to content

Commit

Permalink
bc_eval.c: use struct buf rather than xmalloc with hard-coded length
Browse files Browse the repository at this point in the history
  • Loading branch information
ksmurchison committed Sep 19, 2024
1 parent 5ad84f4 commit e3f91da
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sieve/bc_eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -1972,9 +1972,10 @@ int sieve_eval_bc(sieve_execute_t *exe, int *impl_keep_p, sieve_interp_t *i,
by-mode = "N" / "R" ; "Notify" or "Return"
by-trace = "T" ; "Trace"
*/
deliverby = xmalloc(14);
snprintf(deliverby, 14, "%+ld;%c%s",
sec, toupper(bymode[0]), cmd.u.r.bytrace ? "T" : "");
struct buf by_value = BUF_INITIALIZER;
buf_printf(&by_value, "%+ld;%c%s",
sec, toupper(bymode[0]), cmd.u.r.bytrace ? "T" : "");
deliverby = buf_release(&by_value);
}

if (i->edited_headers) i->getheadersection(m, &headers);
Expand Down

0 comments on commit e3f91da

Please sign in to comment.