From 8f79ea1d8c195cee799f63dd57928f96a2e7cd20 Mon Sep 17 00:00:00 2001 From: taligentx Date: Tue, 24 Jul 2018 13:25:29 -0500 Subject: [PATCH] Implement patch for atsc_epg segfault on 64-bit systems, Debian bug report 779520 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=779520 --- util/atsc_epg/atsc_epg.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/util/atsc_epg/atsc_epg.c b/util/atsc_epg/atsc_epg.c index 288c42b..aee3500 100644 --- a/util/atsc_epg/atsc_epg.c +++ b/util/atsc_epg/atsc_epg.c @@ -60,8 +60,8 @@ static char separator[80]; void (*old_handler)(int); struct atsc_string_buffer { - int buf_len; - int buf_pos; + size_t buf_len; + size_t buf_pos; char *string; }; @@ -69,10 +69,10 @@ struct atsc_event_info { uint16_t id; struct tm start; struct tm end; - int title_pos; - int title_len; - int msg_pos; - int msg_len; + size_t title_pos; + size_t title_len; + size_t msg_pos; + size_t msg_len; }; struct atsc_eit_section_info { @@ -507,8 +507,8 @@ static int parse_message(struct atsc_channel_info *channel, event->msg_pos = channel->msg_buf.buf_pos; if(0 > atsc_text_segment_decode(seg, (uint8_t **)&channel->msg_buf.string, - (size_t *)&channel->msg_buf.buf_len, - (size_t *)&channel->msg_buf.buf_pos)) { + &channel->msg_buf.buf_len, + &channel->msg_buf.buf_pos)) { fprintf(stderr, "%s(): error calling " "atsc_text_segment_decode()\n", __FUNCTION__); @@ -653,8 +653,8 @@ static int parse_events(struct atsc_channel_info *curr_info, e_info->title_pos = curr_info->title_buf.buf_pos; if(0 > atsc_text_segment_decode(seg, (uint8_t **)&curr_info->title_buf.string, - (size_t *)&curr_info->title_buf.buf_len, - (size_t *)&curr_info->title_buf.buf_pos)) { + &curr_info->title_buf.buf_len, + &curr_info->title_buf.buf_pos)) { fprintf(stderr, "%s(): error calling " "atsc_text_segment_decode()\n", __FUNCTION__);