From d9f015035a967de95e106b6a70983edf2a13cc94 Mon Sep 17 00:00:00 2001 From: Mimi Zohar Date: Mon, 6 Jul 2020 09:24:14 -0400 Subject: [PATCH] ima-evm-utils: use uint32_t for template length The template length should never be less than zero. Replace "int" with "uint32_t". Signed-off-by: Mimi Zohar --- src/evmctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/evmctl.c b/src/evmctl.c index eda7dd8..9162de2 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];