diff options
author | Petri Hintukainen <phintuka@users.sourceforge.net> | 2012-04-26 13:58:54 +0300 |
---|---|---|
committer | Petri Hintukainen <phintuka@users.sourceforge.net> | 2012-04-26 13:58:54 +0300 |
commit | f75e0c5efc1fcedf4312acedd4e36fd7f5314127 (patch) | |
tree | e0b45e6dab3b19002d1791fa93438dee22be96e2 /src | |
parent | ee7f8b278836b0fca2a07b9a413dd25d7e10c88e (diff) | |
download | xine-lib-f75e0c5efc1fcedf4312acedd4e36fd7f5314127.tar.gz xine-lib-f75e0c5efc1fcedf4312acedd4e36fd7f5314127.tar.bz2 |
Check read() return value
Diffstat (limited to 'src')
-rw-r--r-- | src/input/input_dvb.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c index 9077c221b..3ed2eea7f 100644 --- a/src/input/input_dvb.c +++ b/src/input/input_dvb.c @@ -1469,9 +1469,17 @@ static void load_epg_data(dvb_input_plugin_t *this) return; } n = read(this->tuner->fd_pidfilter[EITFILTER], eit, 3); + if (n != 3) { + xprintf(this->stream->xine,XINE_VERBOSITY_LOG,"Error reading EPG section length\n"); + break; + } table_id = getbits(eit, 0, 8); section_len = (unsigned int)getbits(eit, 12, 12); n = read(this->tuner->fd_pidfilter[EITFILTER], eit + 3, section_len); + if (n != section_len) { + xprintf(this->stream->xine,XINE_VERBOSITY_LOG,"Error reading EPG section data\n"); + break; + } service_id = (unsigned int)getbits(eit, 24, 16); |