lkml.org 
[lkml]   [2021]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] media: vidtv: Fix a wild pointer dereference in vidtv_channel_pmt_match_sections()
From
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

\
 
 \ /
  Last update: 2021-12-02 18:07    [W:0.038 / U:1.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site