Message ID | 1594088791-27370-6-git-send-email-zohar@linux.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ima-evm-utils: miscellanous code clean up and bug fixes | expand |
diff --git a/src/evmctl.c b/src/evmctl.c index eda7dd845930..9162de2a5aeb 100644 --- a/src/evmctl.c +++ b/src/evmctl.c @@ -1404,9 +1404,9 @@ struct template_entry { uint32_t name_len; } header __packed; char name[TCG_EVENT_NAME_LEN_MAX + 1]; - int template_len; + uint32_t template_buf_len; + uint32_t template_len; uint8_t *template; - int template_buf_len; }; static uint8_t zero[MAX_DIGEST_SIZE];
The template length should never be less than zero. Replace "int" with "uint32_t". Signed-off-by: Mimi Zohar <zohar@linux.ibm.com> --- src/evmctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)