Bug 779520 - Segfault--can't get any (ATSC) EPG Data on 64bit
Andrew Siplas
andrew at asip.xyz
Fri Dec 11 19:45:13 UTC 2015
Anyone available to look over and perhaps add in a somewhat critical but
simple patch for dvb-apps?
Program atsc_epg fails to work on 64bit machine, segfaulting while
reading data and providing no electronic program guide data before
fault; from what I can tell it's due to storing address in an int, which
wouldn't always fit, changed int to size_t and all seems good; I'm
receiving all guide data with no faults.
See Bug 779520.
Quilt Patch:
-------------
Description: Storing address inside int leads to segfault on 64-bit machine
Author: Andrew Siplas <andrew at asip.xyz>
Date: Sun, 06 Sep 2015 04:25:59 -0500
===================================================================
--- linuxtv-dvb-apps-1.1.1+rev1500.orig/util/atsc_epg/atsc_epg.c
+++ linuxtv-dvb-apps-1.1.1+rev1500/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_cha
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_chan
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__);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 648 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-vdr-dvb-devel/attachments/20151211/2bd981d7/attachment.sig>
More information about the pkg-vdr-dvb-devel
mailing list