lkml.org 
[lkml]   [2022]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] ima: Fix misuse of dereference of pointer in template_desc_init_fields()
From
Date
On Mon, 2022-11-14 at 08:37 +0000, Roberto Sassu wrote:
> > From: Xiujianfeng
> > Sent: Saturday, November 12, 2022 10:27 AM
> > 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>

Thanks, applied.

Mimi

\
 
 \ /
  Last update: 2022-11-16 17:56    [W:0.030 / U:0.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site