Messages in this thread | | | Date | Thu, 2 Dec 2021 14:07:04 -0300 | Subject | Re: [PATCH] media: vidtv: Fix a wild pointer dereference in vidtv_channel_pmt_match_sections() | From | Daniel Almeida <> |
| |
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@collabora.com>
Thanks,
-- Daniel
| |