]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
epggrab: add some additional checks in the EIT code for empty strings.
authorAdam Sutton <dev@adamsutton.me.uk>
Wed, 16 Jan 2013 09:40:45 +0000 (09:40 +0000)
committerAdam Sutton <dev@adamsutton.me.uk>
Wed, 16 Jan 2013 09:40:45 +0000 (09:40 +0000)
src/epggrab/module/eit.c

index 0ca20563a510ec4c601a0e3596ffcacba66211e3..c9169fb8e3ffbf8099fa587b573e942967cbdd10 100644 (file)
@@ -242,7 +242,7 @@ static int _eit_desc_short_event
   if ( (r = _eit_get_string_with_len(mod, buf, sizeof(buf),
                                      ptr, len, ev->default_charset)) < 0 ) {
     return -1;
-  } else {
+  } else if ( r > 1 ) {
     if (!ev->title) ev->title = lang_str_create();
     lang_str_add(ev->title, buf, lang, 0);
   }
@@ -255,7 +255,7 @@ static int _eit_desc_short_event
   if ( (r = _eit_get_string_with_len(mod, buf, sizeof(buf),
                                      ptr, len, ev->default_charset)) < 0 ) {
     return -1;
-  } else {
+  } else if ( r > 1 ) {
     if (!ev->summary) ev->summary = lang_str_create();
     lang_str_add(ev->summary, buf, lang, 0);
   }
@@ -460,6 +460,7 @@ static int _eit_desc_crid
                                    ptr+1, len-1,
                                    ev->default_charset);
       if (r < 0) return -1;
+      if (r == 0) continue;
 
       /* Episode */
       if (type == 0x1 || type == 0x31) {