The template length should never be less than zero. Replace "int" with "uint32_t". Signed-off-by: Mimi Zohar <zohar@xxxxxxxxxxxxx> --- src/evmctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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]; -- 2.7.5