[libdvbpsi-devel] [PATCH] SEGV fixed in dvbpsi_decoder_psi_section_add

Michael Kasch - SmartCast kasch at smartcast.de
Tue Oct 30 15:11:56 CET 2012


Dear Jean-Paul,
i think i found the Problem for the SEGV still occuring.

please find the Patch attached.

Regards,
Michael

>From 6eaca9164219365e4003099df53399f195829c28 Mon Sep 17 00:00:00 2001
From: Michael Kasch <michael.kasch at gmail.com>
Date: Tue, 30 Oct 2012 15:00:53 +0100
Subject: [PATCH] src/dvbpsi.c: fix segmentation fault in
 dvbpsi_decoder_psi_section_add()

When p->i_number == p_section->i_number AND p_prev == NULL, then the
first element of the list has to be replaced. Since it is the first
element we have to update the pointer to the list, which is pointing to
the first element
---
 src/dvbpsi.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/src/dvbpsi.c b/src/dvbpsi.c
index d45802e..0555b14 100644
--- a/src/dvbpsi.c
+++ b/src/dvbpsi.c
@@ -272,6 +272,7 @@ bool dvbpsi_decoder_psi_section_add(dvbpsi_decoder_t *p_decoder, dvbpsi_psi_sect
                 p->p_next = NULL;
                 dvbpsi_DeletePSISections(p);
                 p = p_section;
+                p_decoder->p_sections = p;
                 b_overwrite = true;
             }
             goto out;
-- 
1.7.10.4


More information about the libdvbpsi-devel mailing list