diff options
| author | phintuka <phintuka> | 2011-08-01 12:23:05 +0000 |
|---|---|---|
| committer | phintuka <phintuka> | 2011-08-01 12:23:05 +0000 |
| commit | d1a1b82dee77c6547ecc4bfbe33d5e54ddaa5550 (patch) | |
| tree | 12c50bd3e28b980548d9a61c40d8a2f420cf5d9b | |
| parent | 79d9a42ebf1404d89e4f149a0957a83b10efe3c9 (diff) | |
| download | xineliboutput-d1a1b82dee77c6547ecc4bfbe33d5e54ddaa5550.tar.gz xineliboutput-d1a1b82dee77c6547ecc4bfbe33d5e54ddaa5550.tar.bz2 | |
Fixed writing outside of buffer when there are more than MAX_PIDS
scrambled pids.
| -rw-r--r-- | xine/BluRay/demux_ts.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xine/BluRay/demux_ts.c b/xine/BluRay/demux_ts.c index 9803ad1e..62a0574a 100644 --- a/xine/BluRay/demux_ts.c +++ b/xine/BluRay/demux_ts.c @@ -1993,8 +1993,10 @@ static void demux_ts_parse_packet (demux_ts_t*this) { for (i=0; i < this->scrambled_npids; i++) { if (this->scrambled_pids[i] == pid) return; } - this->scrambled_pids[this->scrambled_npids] = pid; - this->scrambled_npids++; + if (this->scrambled_npids < MAX_PIDS) { + this->scrambled_pids[this->scrambled_npids] = pid; + this->scrambled_npids++; + } xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_ts: PID 0x%.4x is scrambled!\n", pid); return; |
