From: Jaroslav Kysela Date: Thu, 12 Nov 2015 08:22:43 +0000 (+0100) Subject: htsmsg: add extra NULL check, to htsmsg_cmp() X-Git-Tag: v4.2.1~1570 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5d1ee60f93cbf8166d06b6530f4790ee5ab4246d;p=thirdparty%2Ftvheadend.git htsmsg: add extra NULL check, to htsmsg_cmp() --- diff --git a/src/htsmsg.c b/src/htsmsg.c index ca59df8d3..a31e06ae3 100644 --- a/src/htsmsg.c +++ b/src/htsmsg.c @@ -951,6 +951,12 @@ htsmsg_cmp(htsmsg_t *m1, htsmsg_t *m2) return 1; f2 = TAILQ_FIRST(&m2->hm_fields); + if (f2 == NULL) { + if (TAILQ_FIRST(&m1->hm_fields) == NULL) + return 0; + return 1; + } + TAILQ_FOREACH(f1, &m1->hm_fields, hmf_link) { if (f1->hmf_type != f2->hmf_type)