]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
htsmsg binary: intialize correctly hm_data_size and hm_islist fields on deserialize
authorJaroslav Kysela <perex@perex.cz>
Mon, 22 May 2017 07:51:33 +0000 (09:51 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 22 May 2017 12:03:35 +0000 (14:03 +0200)
src/htsmsg_binary.c

index 21c5071f9fe52ad19aa4de12e8f77ab110c81819..d4bbf3532b4d2c48cfd16713b9a062822ede590a 100644 (file)
@@ -105,6 +105,8 @@ htsmsg_binary_des0(htsmsg_t *msg, const uint8_t *buf, size_t len)
       sub = &f->hmf_msg;
       TAILQ_INIT(&sub->hm_fields);
       sub->hm_data = NULL;
+      sub->hm_data_size = 0;
+      sub->hm_islist = type == HMF_LIST;
       i = htsmsg_binary_des0(sub, buf, datalen);
       if (i < 0) {
 #if ENABLE_SLOW_MEMORYINFO