diff mbox series

[5/6] ima-evm-utils: use uint32_t for template length

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

Commit Message

Mimi Zohar July 7, 2020, 2:26 a.m. UTC
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(-)
diff mbox series

Patch

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];