]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
DVR: Fixed the channel icon url, fixes #2322
authorJaroslav Kysela <perex@perex.cz>
Sun, 21 Sep 2014 13:28:13 +0000 (15:28 +0200)
committerJaroslav Kysela <perex@perex.cz>
Sun, 21 Sep 2014 13:28:13 +0000 (15:28 +0200)
src/dvr/dvr_db.c

index 98293ae63404e9555ec1913d2109a7e046895aeb..d9b3aaa21d211c90ec90aa777880a33637a5dd34 100644 (file)
@@ -1577,7 +1577,7 @@ dvr_entry_class_channel_icon_url_get(void *o)
     snprintf(buf, sizeof(buf), "imagecache/%d", id);
   } else {
     strncpy(buf, ch->ch_icon ?: "", sizeof(buf));
-    buf[strlen(buf)-1] = '\0';
+    buf[sizeof(buf)-1] = '\0';
   }
   s = buf;
   return &s;