]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
bouquet: fix possible NULL dereference
authorJaroslav Kysela <perex@perex.cz>
Fri, 19 Jun 2015 06:52:11 +0000 (08:52 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 19 Jun 2015 06:52:11 +0000 (08:52 +0200)
src/bouquet.c

index 298202bc25f563fd1f1b1786557e8e962f1654c7..5e88d37fc0494a84cd4ea7f9a84d746f0a42a693 100644 (file)
@@ -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);