]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
htsp: ensure that NULL isn't passed as usernmae to access routines
authorAdam Sutton <dev@adamsutton.me.uk>
Fri, 14 Mar 2014 09:40:30 +0000 (09:40 +0000)
committerAdam Sutton <dev@adamsutton.me.uk>
Fri, 14 Mar 2014 09:40:30 +0000 (09:40 +0000)
src/htsp_server.c

index 60886eefd5dac0d1d67d24ef73860bf4fd25e7a6..efd165ac7806a318cc1c2f8d6c3306cc1aaa1a21 100644 (file)
@@ -438,7 +438,7 @@ htsp_user_access_channel(htsp_connection_t *htsp, channel_t *ch) {
     if (!ch) return 0;
     channel_tag_mapping_t *ctm;
     LIST_FOREACH(ctm, &ch->ch_ctms, ctm_channel_link) {
-      if (!strcmp(htsp->htsp_username, ctm->ctm_tag->ct_name))
+      if (!strcmp(htsp->htsp_username ?: "", ctm->ctm_tag->ct_name))
         return 1;
     }
   }