[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <805c6ead-1e8f-19a1-dc0f-565fb0563a1c@gmail.com>
Date: Thu, 2 Dec 2021 14:07:04 -0300
From: Daniel Almeida <dwlsalmeida@...il.com>
To: Hans Verkuil <hverkuil@...all.nl>, Zhou Qingyang <zhou1615@....edu>
Cc: kjlu@....edu, Mauro Carvalho Chehab <mchehab@...nel.org>,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] media: vidtv: Fix a wild pointer dereference in
vidtv_channel_pmt_match_sections()
Hi Zhou Qingyang, thanks for the patch.
Yes this is a real issue.
> +
> + if (!tail) {
> + vidtv_psi_pmt_stream_destroy(head);
> + dev_warn_ratelimited(m->dev,
> + "No enough memory for vidtv_psi_pmt_stream_init");
> + return;
> + }
Yes this is the right thing to do, as vidtv_psi_pmt_stream_destroy will
free the stream chain and all descriptors associated with it, if any.
By then aborting out of this function, we will have a PMT section
without any streams. This is OK if the allocation failed.
Reviewed-by Daniel Almeida <daniel.almeida@...labora.com>
Thanks,
-- Daniel
Powered by blists - more mailing lists