29 lines
830 B
Diff
29 lines
830 B
Diff
From 108d9ba48ab922521b1124970156f2d2f59eea0b Mon Sep 17 00:00:00 2001
|
|
From: Jerry Snitselaar <jsnitsel@redhat.com>
|
|
Date: Thu, 21 Jun 2018 09:13:54 -0700
|
|
Subject: [PATCH 3/3] imalib: call memcmp with correct size
|
|
|
|
imaEvent digest is size of SHA1_DIGEST_SIZE, so call memcmp with that value.
|
|
|
|
Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
|
|
---
|
|
utils/imalib.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/utils/imalib.c b/utils/imalib.c
|
|
index a7f42fc..42e2aa5 100644
|
|
--- a/utils/imalib.c
|
|
+++ b/utils/imalib.c
|
|
@@ -826,7 +826,7 @@ uint32_t IMA_Extend(TPMT_HA *imapcr,
|
|
}
|
|
}
|
|
if (rc == 0) {
|
|
- notAllZero = memcmp(imaEvent->digest, zeroDigest, digestSize);
|
|
+ notAllZero = memcmp(imaEvent->digest, zeroDigest, SHA1_DIGEST_SIZE);
|
|
imapcr->hashAlg = hashAlg;
|
|
if (notAllZero) {
|
|
#if 0
|
|
--
|
|
2.17.0
|
|
|