diff options
author | Xiu Jianfeng <xiujianfeng@huawei.com> | 2022-11-12 10:27:19 +0100 |
---|---|---|
committer | Mimi Zohar <zohar@linux.ibm.com> | 2022-11-16 17:47:55 +0100 |
commit | 25369175ce84813dd99d6604e710dc2491f68523 (patch) | |
tree | e0d8966f673ad10b23cd728b4162ba84bfbf56ec /scripts/recordmcount.pl | |
parent | integrity: Fix memory leakage in keyring allocation error path (diff) | |
download | linux-25369175ce84813dd99d6604e710dc2491f68523.tar.xz linux-25369175ce84813dd99d6604e710dc2491f68523.zip |
ima: Fix misuse of dereference of pointer in template_desc_init_fields()
The input parameter @fields is type of struct ima_template_field ***, so
when allocates array memory for @fields, the size of element should be
sizeof(**field) instead of sizeof(*field).
Actually the original code would not cause any runtime error, but it's
better to make it logically right.
Fixes: adf53a778a0a ("ima: new templates management mechanism")
Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
Reviewed-by: Roberto Sassu <roberto.sassu@huawei.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Diffstat (limited to 'scripts/recordmcount.pl')
0 files changed, 0 insertions, 0 deletions