]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
xmltv import: fix the wrong end-of-string mark (off-by-one), fixes #5443
authorJaroslav Kysela <perex@perex.cz>
Mon, 17 Dec 2018 10:30:52 +0000 (11:30 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 17 Dec 2018 10:30:52 +0000 (11:30 +0100)
src/epggrab/module/xmltv.c

index 4fbdfb55fd4173dc618b5a3dc025edb6d2e637df..c87d041a0edfe55b377c8a2a7dd035f47c979079 100644 (file)
@@ -588,7 +588,7 @@ _xmltv_parse_credits(htsmsg_t **out_credits, htsmsg_t *tags)
       
         if (strlen(str) > 255) {
           str2 = strdup(str);
-          str2[256] = '\0';
+          str2[255] = '\0';
           str = str2;
         }
       
@@ -603,7 +603,7 @@ _xmltv_parse_credits(htsmsg_t **out_credits, htsmsg_t *tags)
           if (s == NULL) break;
 
           if (strlen(s) > 255)
-            s[256] = '\0';
+            s[255] = '\0';
 
           if (!credits_names) credits_names = string_list_create();
           string_list_insert(credits_names, s);