if the title of the EIT event is longer than the available data,
make sure the allocated buffer is not lost
Signed-off-by: André Roth <neolynx@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
atsc_time(event->start_time, &event->start);
event->source_id = eit->header.id;
+ if(!*head)
+ *head = event;
+ if(last)
+ last->next = event;
+
size = event->title_length - 1;
if (p + size > endbuf) {
dvb_logerr("%s: short read %zd/%zd bytes", __func__,
/* TODO: parse title */
p += size;
- if(!*head)
- *head = event;
- if(last)
- last->next = event;
-
/* get the descriptors for each program */
size = sizeof(union atsc_table_eit_desc_length);
if (p + size > endbuf) {