Hi,
vdr-plugin-eepg is needed to record Freesat channels on Astra 28E.
I'll attach a diff to make load_freesat_file() work again:
%a[] to allocate a string does not exist anymore since C99.
I have not looked at the lock/unlock mechanism, so the plugin will
freeze vdr when you try to switch channels now and then. Somebody else
please fix this.
Best regards, Wolfgang Thiel
--- vdr-plugin-eepg-0.0.5+git20180222.orig/eepg.c
+++ vdr-plugin-eepg-0.0.5+git20180222/eepg.c
@@ -382,16 +382,17 @@ static unsigned long decode_binary (char
static bool load_freesat_file (int tableid, const char *filename)
{
char buf[1024];
- char *from, *to, *binary;
+ char from[1024], to[1024], binary[1024];
FILE *fp;
+ buf[sizeof(buf)-1] = 0;
tableid--;
if ((fp = fopen (filename, "r")) != NULL) {
LogI(2, prep("Loading table %d Filename <%s>"), tableid + 1, filename);
- while (fgets (buf, sizeof (buf), fp) != NULL) {
- from = binary = to = NULL;
- int elems = sscanf (buf, "%a[^:]:%a[^:]:%a[^:]:", &from, &binary, &to);
+ while (fgets (buf, sizeof (buf) - 1, fp) != NULL) {
+ from[0] = to[0] = binary[0] = 0;
+ int elems = sscanf (buf, "%[^:]:%[^:]:%[^:]:", from, binary, to);
if (elems == 3) {
int bin_len = strlen (binary);
int from_char = resolve_char (from);
@@ -406,10 +407,6 @@ static bool load_freesat_file (int table
tables[tableid][from_char][i].bits = bin_len;
/* char from; unsigned int value; short bits; char next; */
LogI(2, prep("%02x;%08x;%04x;%02x"), from_char, bin, bin_len, to_char);
-
- free (from);
- free (to);
- free (binary);
}
}
fclose (fp);
_______________________________________________
pkg-vdr-dvb-devel mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-vdr-dvb-devel