Commit 712a49bd7d00d567edd5235e6e9034c55052446b

Authored by Roberto Sassu
Committed by Mimi Zohar
1 parent c502c78ba7

ima: pass HASH_ALGO__LAST as hash algo in ima_eventdigest_init()

Replace the '-1' value with HASH_ALGO__LAST in ima_eventdigest_init()
as the called function ima_eventdigest_init_common() expects an unsigned
char.

Fix commit:
  4d7aeee ima: define new template ima-ng and template fields d-ng and n-ng

Signed-off-by: Roberto Sassu <roberto.sassu@polito.it>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

security/integrity/ima/ima_template_lib.c
... ... @@ -239,8 +239,8 @@
239 239 cur_digest = hash.hdr.digest;
240 240 cur_digestsize = hash.hdr.length;
241 241 out:
242   - return ima_eventdigest_init_common(cur_digest, cur_digestsize, -1,
243   - field_data, true);
  242 + return ima_eventdigest_init_common(cur_digest, cur_digestsize,
  243 + HASH_ALGO__LAST, field_data, true);
244 244 }
245 245  
246 246 /*