From f72601d06378494b5026b919fcd3eb5eb22799a1 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 16 Dec 2011 06:02:56 +0100 Subject: txddemux: Limit allocated packets to filesize. Fixes Ticket772 Bug found by: Diana Elena Muscalu Signed-off-by: Michael Niedermayer --- libavformat/txd.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libavformat/txd.c') diff --git a/libavformat/txd.c b/libavformat/txd.c index 5d9f969270..284d53212f 100644 --- a/libavformat/txd.c +++ b/libavformat/txd.c @@ -48,6 +48,9 @@ static int txd_read_header(AVFormatContext *s, AVFormatParameters *ap) { st->codec->time_base.den = 5; st->codec->time_base.num = 1; /* the parameters will be extracted from the compressed bitstream */ + + s->pb->maxsize= avio_size(s->pb); + return 0; } -- cgit v1.2.3