diff options
author | phintuka <phintuka> | 2012-12-31 16:44:27 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2012-12-31 16:44:27 +0000 |
commit | ce77c03ed8b315ed9922e870882fb5ad1a0b296f (patch) | |
tree | 62ca15c79d46b049a3b11d00244585c6cc0fef35 | |
parent | cd2a325e0cf736e489236ed5e8b4ab1a128fb547 (diff) | |
download | xineliboutput-ce77c03ed8b315ed9922e870882fb5ad1a0b296f.tar.gz xineliboutput-ce77c03ed8b315ed9922e870882fb5ad1a0b296f.tar.bz2 |
Fixed segfault in PMT parsing when first ts packet of pmt section has been lost
-rw-r--r-- | tools/ts.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: ts.c,v 1.29 2011-11-13 09:45:01 phintuka Exp $ + * $Id: ts.c,v 1.30 2012-12-31 16:44:27 phintuka Exp $ * */ @@ -321,6 +321,11 @@ int ts_parse_pmt (pmt_data_t *pmt, uint program_no, const uint8_t *pkt) } } + if (!pmt->pmt) { + LOGMSG("parse_pmt: dropping PMT packet without PUSI"); + return 0; + } + if (!pusi) { section_length = (pmt->pmt[1] << 8 | pmt->pmt[2]) & 0x03ff; version_number = (pkt[10] >> 1) & 0x1f; |