From 0df43b15cc72091301a4293823cb04b19033beae Mon Sep 17 00:00:00 2001 From: "E.Smith" <31170571+azlm8t@users.noreply.github.com> Date: Tue, 20 Nov 2018 12:47:08 +0000 Subject: [PATCH] api: Fix NULL blank argument. The blank argument is NULL on several paths, so fix this to reference a local variable so we can lookup channel name properly. --- src/api/api_epg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/api/api_epg.c b/src/api/api_epg.c index 82d4760ce..b82489d97 100644 --- a/src/api/api_epg.c +++ b/src/api/api_epg.c @@ -74,7 +74,7 @@ api_epg_add_channel ( htsmsg_t *m, channel_t *ch, const char *blank ) static htsmsg_t * api_epg_entry ( epg_broadcast_t *eb, const char *lang, access_t *perm, const char **blank ) { - const char *s; + const char *s, *blank2 = NULL; char buf[64]; channel_t *ch = eb->channel; htsmsg_t *m, *m2; @@ -85,6 +85,8 @@ api_epg_entry ( epg_broadcast_t *eb, const char *lang, access_t *perm, const cha if (!ch) return NULL; + if (blank == NULL) + blank = &blank2; if (*blank == NULL) *blank = tvh_gettext_lang(lang, channel_blank_name); -- 2.47.3