diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2007-11-13 19:25:13 +0000 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2007-11-13 19:25:13 +0000 |
commit | 1bdf861e88e7fa78c0f8e7789c4417321b0fb05b (patch) | |
tree | 6f9900446aa72a10b711af736d3436f1c1acc4cd | |
parent | 658dd8c0474b381003f514ea6438ad70b6d22578 (diff) | |
download | xine-lib-1bdf861e88e7fa78c0f8e7789c4417321b0fb05b.tar.gz xine-lib-1bdf861e88e7fa78c0f8e7789c4417321b0fb05b.tar.bz2 |
Fix a possible DVB plugin crash when switching channels.
section_length is sometimes 0; this leads to the CRC32 calculation being
performed with a data length of -1 bytes, a.k.a. 4294967295 bytes.
(Reported by Johannes Zellner.)
--HG--
extra : transplant_source : %B6m%D0%0C%84%DA%40%C3%0B%06%11%B1%11%9El%A8%1F%95%27%E5
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/demuxers/demux_ts.c | 6 |
2 files changed, 4 insertions, 3 deletions
@@ -13,6 +13,7 @@ xine-lib (1.1.9) (unreleased) * Implemented decoding of XML character entities with codes >= 256. This requires conversion to UTF-8 of entities with codes >= 128. * Fixed ATSC support. [Bug 1749508] + * Fixed a possible DVB plugin crash when switching channels. xine-lib (1.1.8) * Send a channel-changed event to the frontend when receiving the SYNC diff --git a/src/demuxers/demux_ts.c b/src/demuxers/demux_ts.c index 3ed6bcecd..86a14f019 100644 --- a/src/demuxers/demux_ts.c +++ b/src/demuxers/demux_ts.c @@ -369,8 +369,8 @@ static void demux_ts_build_crc32_table(demux_ts_t*this) { } static uint32_t demux_ts_compute_crc32(demux_ts_t*this, uint8_t *data, - uint32_t length, uint32_t crc32) { - uint32_t i; + int32_t length, uint32_t crc32) { + int32_t i; for(i = 0; i < length; i++) { crc32 = (crc32 << 8) ^ this->crc32_table[(crc32 >> 24) ^ data[i]]; @@ -521,7 +521,7 @@ static void demux_ts_parse_pat (demux_ts_t*this, unsigned char *original_pkt, unsigned char *pkt, unsigned int pusi) { uint32_t table_id; uint32_t section_syntax_indicator; - uint32_t section_length; + int32_t section_length; uint32_t transport_stream_id; uint32_t version_number; uint32_t current_next_indicator; |