From: Jaroslav Kysela Date: Fri, 19 Jun 2015 06:52:11 +0000 (+0200) Subject: bouquet: fix possible NULL dereference X-Git-Tag: v4.2.1~2309 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bfb764458451ea3ec41ae0f01d42c209d9c92792;p=thirdparty%2Ftvheadend.git bouquet: fix possible NULL dereference --- diff --git a/src/bouquet.c b/src/bouquet.c index 298202bc2..5e88d37fc 100644 --- a/src/bouquet.c +++ b/src/bouquet.c @@ -159,7 +159,7 @@ bouquet_find_by_source(const char *name, const char *src, int create) bqs.bq_src = (char *)src; bq = RB_FIND(&bouquets, &bqs, bq_link, _bq_cmp); if (bq) { - if (name && *name && strcmp(name, bq->bq_name)) { + if (name && *name && bq->bq_name && strcmp(name, bq->bq_name)) { tvhwarn("bouquet", "bouquet name '%s' changed to '%s'", bq->bq_name ?: "", name); free(bq->bq_name); bq->bq_name = strdup(name);