[PATCH] SEGV fixed in dvbpsi_decoder_psi_section_add
Roberto Corno <[email protected]>
| Newsgroups | gmane.comp.video.videolan.libdvbpsi.devel |
|---|---|
| Message-ID | <CAO6YRm8-CuBKa8or03QAXmUrngCO+R1cqnYvau4TDUizHnyn7Q@mail.gmail.com> |
SEGV happens within dvbpsi_decoder_psi_section_add when p->i_number == p_section->i_number and p_prev == NULL. It's the first branch of the while(p) loop. I got it with a heavily degraded transport stream, where a lot of CC error occur. I've added the check for p_prev==NULL Patch attached. Regards, Roberto _______________________________________________ libdvbpsi-devel mailing list [email protected] http://mailman.videolan.org/listinfo/libdvbpsi-devel
0001-dvbpsi_decoder_psi_section_add-NULL-check.patch
(application/octet-stream, 727 B)
From 08d2f94cc6394ef27cbe9310f839d3cf1e5fba98 Mon Sep 17 00:00:00 2001 From: Roberto Corno <[email protected]> Date: Mon, 3 Sep 2012 15:03:15 +0200 Subject: [PATCH] dvbpsi_decoder_psi_section_add NULL check --- src/dvbpsi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/dvbpsi.c b/src/dvbpsi.c index 5198a98..b3573d0 100644 --- a/src/dvbpsi.c +++ b/src/dvbpsi.c @@ -255,7 +255,7 @@ bool dvbpsi_decoder_psi_section_add(dvbpsi_decoder_t *p_decoder, dvbpsi_psi_sect while (p) { - if (p->i_number == p_section->i_number) + if (p->i_number == p_section->i_number && p_prev) { /* Replace */ p_prev->p_next = p_section; -- 1.7.5.4