linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
To: Olcay Korkmaz <olcay.krkmz@gmail.com>
Cc: linux-media@vger.kernel.org
Subject: Re: bug: dvbv5-scan segfaults
Date: Tue, 27 Aug 2019 10:09:53 -0300	[thread overview]
Message-ID: <20190827100953.0e8dc268@coco.lan> (raw)
In-Reply-To: <CADBDwkdbeRPC9VWYqLUcw-As8d14EqhD3qpdjc4c43s4dS5Nsg@mail.gmail.com>

Em Mon, 26 Aug 2019 22:25:28 +0300
Olcay Korkmaz <olcay.krkmz@gmail.com> escreveu:

> 1.14.2 and git tree build gives the same error
> TS of entire transponder:
> https://drive.google.com/file/d/1zHouZSlbPowyJY5tzT5ro0r4ciPURkbi/view?usp=sharing

Thanks!

Please don't top-post.

> > Em Mon, 26 Aug 2019 19:59:17 +0300
> > Olcay Korkmaz <olcay.mz@gmail.com> escreveu:
> >  


> > > Service TV8, provider TV8: digital television
> > > Storing as channel TV8
> > >
> > > Program received signal SIGSEGV, Segmentation fault.
> > > 0x00007ffff7ba5cff in dvb_store_channel ()
> > >    from /usr/lib/x86_64-linux-gnu/libdvbv5.so.0
> > > (gdb) backtrace  
> >
> >  
> > > #0 0x00007ffff7ba5cff in dvb_store_channel ()
> > >    from /usr/lib/x86_64-linux-gnu/libdvbv5.so.0
> > > #1 0x00005555555560c6 in run_scan (dvb=0x55555575d2e0, args=0x7fffffffdc80)
> > >     at dvbv5-scan.c:313
> > > #2 main (argc=<optimized out>, argv=<optimized out>) at dvbv5-scan.c:562

Ok, the problem is happening here:

Program received signal SIGSEGV, Segmentation fault.
dvb_store_channel (dvb_file=0x7fffffffe460, __p=0x5555555605d0, dvb_scan_handler=0x555555565060, get_detected=0, 
    get_nit=0) at dvb-file.c:1345
1345			if (dvb_scan_handler->nit->transport) {
(gdb) bt
#0  dvb_store_channel (dvb_file=0x7fffffffe460, __p=0x5555555605d0, dvb_scan_handler=0x555555565060, get_detected=0, 
    get_nit=0) at dvb-file.c:1345
#1  0x0000555555556847 in run_scan (dvb=0x5555555604f0, args=0x7fffffffe4b0) at dvbv5-scan.c:313
#2  main (argc=<optimized out>, argv=<optimized out>) at dvbv5-scan.c:562

The enclosed patch should fix the issue. Could you please check?

diff --git a/lib/libdvbv5/dvb-file.c b/lib/libdvbv5/dvb-file.c
index d077271a6546..474b59cb6fce 100644
--- a/lib/libdvbv5/dvb-file.c
+++ b/lib/libdvbv5/dvb-file.c
@@ -1342,7 +1342,7 @@ int dvb_store_channel(struct dvb_file **dvb_file,
 			dvb_log(_("Storing as channel %s"), channel);
 		vchannel = dvb_vchannel(parms, dvb_scan_handler->nit, service->service_id);
 
-		if (dvb_scan_handler->nit->transport) {
+		if (dvb_scan_handler->nit && dvb_scan_handler->nit->transport) {
 			network_id = dvb_scan_handler->nit->transport->network_id;
 			transport_id = dvb_scan_handler->nit->transport->transport_id;
 		}


Regards,
Mauro

  reply	other threads:[~2019-08-27 13:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-26 16:59 bug: dvbv5-scan segfaults Olcay Korkmaz
2019-08-26 17:40 ` Mauro Carvalho Chehab
2019-08-26 19:25   ` Olcay Korkmaz
2019-08-27 13:09     ` Mauro Carvalho Chehab [this message]
2019-08-27 16:49       ` Olcay Korkmaz
2019-08-27 17:19         ` Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190827100953.0e8dc268@coco.lan \
    --to=mchehab+samsung@kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=olcay.krkmz@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).