On Wed, 2020-07-15 at 18:39 -0300, Bruno Meneguele wrote: > diff --git a/src/evmctl.c b/src/evmctl.c > index 2f5bd52..2bd37c2 100644 > --- a/src/evmctl.c > +++ b/src/evmctl.c > @@ -2252,7 +2252,8 @@ static int cmd_ima_bootaggr(struct command *cmd) > bootaggr_len += strlen(tpm_banks[i].algo_name) + 1; > bootaggr_len += (tpm_banks[i].digest_size * 2) + 1; > } > - bootaggr = malloc(bootaggr_len); > + /* Make room for the leading \0 */ ^Trailing null Mimi > + bootaggr = malloc(bootaggr_len + 1); > > /* > * Calculate and convert the per TPM 2.0 PCR bank algorithm