Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
epg: fix possible NULL dereference cause by previous genre changes
  • Loading branch information
perexg committed Jun 30, 2015
1 parent c554b9a commit 6e9f64c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/epg.c
Expand Up @@ -2104,8 +2104,11 @@ static const char *_genre_get_name(int a, int b, const char *lang)
size_t l = 0;
const char **p = _epg_genre_names[a][b];
name[0] = '\0';
if (p == NULL)
return NULL;
for ( ; *p; p++)
tvh_strlcatf(name, sizeof(name), l, "%s%s", l ? " / " : "", lang ? tvh_gettext(*p) : *p);
tvh_strlcatf(name, sizeof(name), l, "%s%s", l ? " / " : "",
lang ? tvh_gettext_lang(lang, *p) : *p);
return name;
}

Expand Down

0 comments on commit 6e9f64c

Please sign in to comment.