Project

General

Profile

Actions

Bug #1634

closed

eepg crash when scanning Sky UK EPG

Added by cheesemonster almost 11 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Start date:
11/29/2013
Due date:
% Done:

100%

Estimated time:

Description

I've been recording an hour of the "EPG Background Audio" channel as a way of getting the 7 day Sky UK EPG merged into VDR. In doing this, I notice regular segfaults:

Core was generated by `/home/nickb/src/vdr/vdr --config=/tv/vdr/config --cachedir=/tv/vdr/cache --vide'.
Program terminated with signal 11, Segmentation fault.
#0  sky_huffman_decode (
    Data=Data@entry=0x7fcf8e7fae47 "\004uк\021=\033A\214\067\023\307\364", <incomplete sequence \360>, Length=14, DecodeText=DecodeText@entry=0x7fcf8e7f9a20 "") at eepg.c:651
651      sNodeH *nH, H=(Format==SKY_IT)?*sky_tables[0]:*sky_tables[1];
(gdb) list
646      return NULL;
647    }
648    
649    int sky_huffman_decode (const u_char * Data, int Length, unsigned char *DecodeText)
650    {
651      sNodeH *nH, H=(Format==SKY_IT)?*sky_tables[0]:*sky_tables[1];
652      int i;
653      int p;
654      int q;
655      bool CodeError;
(gdb) print sky_tables[0]
$1 = (sNodeH *) 0x0
(gdb) print sky_tables[1]
$2 = (sNodeH *) 0x0
(gdb) quit
root@satellite:/# 

So it looks like the sky_tables array is being initialised too late here. My suggested fix is to initialise the sky_tables at the point in time that the filter is added, just like for Freeview:

diff --git a/eepg.c b/eepg.c
index 6bf997a..5b483ad 100644
--- a/eepg.c
+++ b/eepg.c
@@ -2687,10 +2687,11 @@ void cFilterEEPG::ProcessNextFormat (bool FirstTime = false)
   case MHW2:
     AddFilter (0x231, 0xc8); //MHW2 Channels & Themes
     break;
   case SKY_IT:
   case SKY_UK:
+    InitDictionary ();
     AddFilter (0x11, 0x4a); //Sky Channels
     break;
   case FREEVIEW: //Freeview, CONT mode //TODO streamline this for other modes
     InitDictionary ();
     AddFilter (pid, 0x4e, 0xfe); //event info, actual(0x4e)/other(0x4f) TS, present/following

With this patch in place, I no longer have regular crashes.


Files

format-filter.patch (5.79 KB) format-filter.patch cheesemonster, 04/08/2014 10:23 PM
format-filter2.patch (6.76 KB) format-filter2.patch dimeptr, 04/10/2014 08:05 PM
Actions

Also available in: Atom PDF