]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
fixed from rpmfusion detected by gcc7
authorJaroslav Kysela <perex@perex.cz>
Fri, 12 May 2017 20:06:17 +0000 (22:06 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 12 May 2017 20:06:17 +0000 (22:06 +0200)
src/dvr/dvr_rec.c
src/epggrab/module/xmltv.c
src/idnode.c
src/lock.c
src/rtsp.c
src/subscriptions.c
src/webui/webui.c

index 0370325ffee39790a5c86b0b106198321855ce39..e126c8027a41a53a2ea13e328e1f9e395a8bd0de 100644 (file)
@@ -612,8 +612,8 @@ dvr_sub_basic_info(const char *id, const char *fmt, const void *aux, char *tmp,
   tmp[0] = '\0';
   HTSMSG_FOREACH(f, info) {
     if (!(e = htsmsg_field_get_map(f))) continue;
-    if ((s = htsmsg_get_str(e, "type")) != NULL) continue;
-    tvh_strlcatf(tmp, tmplen, l, "%s%s", l > 0 ? "," : "", s);
+    if ((s = htsmsg_get_str(e, "type")) != NULL)
+      tvh_strlcatf(tmp, tmplen, l, "%s%s", l > 0 ? "," : "", s);
   }
   return tmp;
 }
@@ -915,7 +915,7 @@ dvr_rec_start(dvr_entry_t *de, const streaming_start_t *ss)
   const source_info_t *si = &ss->ss_si;
   streaming_start_t *ss_copy;
   const streaming_start_component_t *ssc;
-  char res[11], asp[6], sr[6], ch[7];
+  char res[14], asp[14], sr[6], ch[7];
   dvr_config_t *cfg = de->de_config;
   profile_chain_t *prch = de->de_chain;
   htsmsg_t *info, *e;
index e4d063001747baf014e140f1aaa12c43e3ac3237..5998919a4415e566bddeba262403a20de7aafc3c 100644 (file)
@@ -843,7 +843,7 @@ static void _xmltv_load_grabbers ( void )
   /* Internal search */
   } else if ((tmp = getenv("PATH"))) {
     tvhdebug(LS_XMLTV, "using internal grab search");
-    char bin[256];
+    char bin[PATH_MAX];
     char *argv[] = {
       NULL,
       (char *)"--description",
index 3d8fad09cbdc9733cc7b8077e93b8f6e98089e6a..17c0dffa99ea9476a122e8980087b39f212cf146 100644 (file)
@@ -1546,7 +1546,7 @@ idnode_slist_set ( idnode_t *in, idnode_slist_t *options, const htsmsg_t *vals )
     ip = (void *)in + o->off;
     if (!changed) {
       HTSMSG_FOREACH(f, vals) {
-        if ((s = htsmsg_field_get_str(f)) != NULL)
+        if ((s = htsmsg_field_get_str(f)) == NULL)
           continue;
         if (strcmp(s, o->id))
           continue;
index 608e02d84b1b5b703be97239897c632c1327a0a3..ffa9d6ebeaab35ad70c1b5f1fe471164fe08b6e2 100644 (file)
@@ -31,7 +31,7 @@ int state_lock_(const char *lfile, int lock, int timeout, int _fd)
     int fd = -1, err = 0;
     struct flock lck;
     struct stat st;
-    char lcktxt[12];
+    char lcktxt[13];
 
     lck.l_type = lock ? F_WRLCK : F_UNLCK;
     lck.l_whence = SEEK_SET;
index dcebe3e8ac81a704dd331b3507813dbd631d335f..274361e25cdcfef21c1d4f48ad5e1015543af892 100644 (file)
@@ -38,7 +38,7 @@ rtsp_send_ext( http_client_t *hc, http_cmd_t cmd,
                 (hc->hc_port != 554 ? 7 : 0) +
                 (path ? strlen(path) : 1) + 1;
   char *buf = alloca(blen);
-  char buf2[7];
+  char buf2[11];
   char buf_body[size + 3];
 
   if (hc->hc_rtsp_session) {
index a54a69217a885c3f29b2b5bdaa9e836630b1add1..2eb998e4a9ecfbaf327fb65847ea87bb22b8d5ad 100644 (file)
@@ -976,7 +976,7 @@ subscription_create_msg(th_subscription_t *s, const char *lang)
   descramble_info_t *di;
   service_t *t;
   profile_t *pro;
-  char buf[256];
+  char buf[284];
   const char *state;
 
   htsmsg_add_u32(m, "id", s->ths_id);
index 4f0421b21bc8ffcdaf7bf6120c8beb87810c6267..a3f22fca19e0dc9a4d6cd3247614cce5786ebf0d 100644 (file)
@@ -211,7 +211,7 @@ page_login(http_connection_t *hc, const char *remain, void *opaque)
 {
   if (hc->hc_access != NULL &&
       hc->hc_access->aa_username != NULL &&
-      hc->hc_access->aa_username != '\0') {
+      *hc->hc_access->aa_username != '\0') {
     http_redirect(hc, "/", &hc->hc_req_args, 0);
     return 0;
   } else {