From 551c3d0e2f49321930267f250682af920a80304f Mon Sep 17 00:00:00 2001 From: Brooss Date: Mon, 2 Mar 2015 13:00:28 +1100 Subject: [PATCH] Fix referencing outdated offset in EPG_decode_extended_event_descriptor --- src/lib_ccx/ts_tables_epg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib_ccx/ts_tables_epg.c b/src/lib_ccx/ts_tables_epg.c index 32c0a3b9..0677ba6a 100644 --- a/src/lib_ccx/ts_tables_epg.c +++ b/src/lib_ccx/ts_tables_epg.c @@ -487,7 +487,7 @@ void EPG_decode_extended_event_descriptor(uint8_t *offset, uint32_t descriptor_l //TODO: can this leak memory with a malformed descriptor? if(descriptor_number>0) { - if(offset[1]<0x20) { + if(offset[1]<0x20) { offset++; text_length--; } @@ -502,7 +502,7 @@ void EPG_decode_extended_event_descriptor(uint8_t *offset, uint32_t descriptor_l memcpy(&event->extended_text[oldlen], &offset[1], text_length); - event->extended_text[oldlen+offset[0]]='\0'; + event->extended_text[oldlen + text_length] = '\0'; if(descriptor_number==last_descriptor_number) { uint8_t *old = event->extended_text;