Re: [PATCH] SEGV fixed in dvbpsi_decoder_psi_section_add
Michael Kasch - SmartCast <[email protected]>
| Newsgroups | gmane.comp.video.videolan.libdvbpsi.devel |
|---|---|
| Message-ID | <[email protected]> |
Dear Jean-Paul, i don't have a test file at the moment, tested it yesterday with live data from some major TV Channels in Germany. Unfortunately I am not in the office today, so i can't provide a capture at the moment. Before the patch i got many valgrind errors and after 0,5 - 3 minutes i got an SEGV. Afterwards it worked fine, without any valgrind errors. In my testing setup its still running since yesterday. regards, Michael ________________________________________ Von: [email protected] [[email protected]]" im Auftrag von "Jean-Paul Saman [[email protected]] Gesendet: Mittwoch, 31. Oktober 2012 09:36 Bis: Michael Kasch - SmartCast Cc: [email protected] Betreff: Re: [libdvbpsi-devel] [PATCH] SEGV fixed in dvbpsi_decoder_psi_section_add Michael, The patch looks good. Do you have a test file for me to try? On Tue, Oct 30, 2012 at 3:11 PM, Michael Kasch - SmartCast <[email protected]> wrote: > 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 <[email protected]> > 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; In this case p points to the head of the list ( p = p_decoder->p_sections), so p = p_section should do the trick. However I wonder if an compiler optimization causes the crash to happen. > + p_decoder->p_sections = p; > b_overwrite = true; > } > goto out; > -- > 1.7.10.4 > _______________________________________________ > libdvbpsi-devel mailing list > [email protected] > http://mailman.videolan.org/listinfo/libdvbpsi-devel Kind regards, Jean-Paul Saman _______________________________________________ libdvbpsi-devel mailing list [email protected] http://mailman.videolan.org/listinfo/libdvbpsi-devel