[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220127104712.sg444qsdittl2kse@ti.com>
Date: Thu, 27 Jan 2022 16:17:12 +0530
From: Pratyush Yadav <p.yadav@...com>
To: Zhou Qingyang <zhou1615@....edu>
CC: <kjlu@....edu>, Benoit Parrot <bparrot@...com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Hans Verkuil <hverkuil-cisco@...all.nl>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
<linux-media@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] media: ti-vpe: cal: Fix a NULL pointer dereference in
cal_ctx_v4l2_init_formats()
On 25/01/22 01:20AM, Zhou Qingyang wrote:
> In cal_ctx_v4l2_init_formats(), devm_kzalloc() is assigned to fw and there
> is a dereference of it after that, which could lead to NULL pointer
> dereference on failure of devm_kzalloc().
>
> Fix this bug by adding a NULL check of ctx->active_fmt.
>
> This bug was found by a static analyzer.
>
> Builds with 'make allyesconfig' show no new warnings,
> and our static analyzer no longer warns about this code.
>
> Fixes: 7168155002cf ("media: ti-vpe: cal: Move format handling to cal.c and expose helpers")
> Signed-off-by: Zhou Qingyang <zhou1615@....edu>
Reviewed-by: Pratyush Yadav <p.yadav@...com>
--
Regards,
Pratyush Yadav
Texas Instruments Inc.
Powered by blists - more mailing lists