Browse code

txddemux: Limit allocated packets to filesize. Fixes Ticket772 Bug found by: Diana Elena Muscalu

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f72601d06378494b5026b919fcd3eb5eb22799a1)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2011/12/16 14:02:56
Showing 1 changed files
... ...
@@ -48,6 +48,9 @@ static int txd_read_header(AVFormatContext *s, AVFormatParameters *ap) {
48 48
     st->codec->time_base.den = 5;
49 49
     st->codec->time_base.num = 1;
50 50
     /* the parameters will be extracted from the compressed bitstream */
51
+
52
+    s->pb->maxsize= avio_size(s->pb);
53
+
51 54
     return 0;
52 55
 }
53 56