From ce0453aac99c826ba0093f701e4dea67718ce457 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 31 Dec 2008 02:47:54 +0000 Subject: 10l set AVPacket.size to the true size of the returned data instead of the (larger) allocated size. (prevents segfaults due to later failures from 900MB-sized packets, yes fuzzed file not a valid one) Originally committed as revision 16404 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/rmdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/rmdec.c') diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index 469b0f5f0e..f6e88d159f 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -551,7 +551,7 @@ static int rm_assemble_video_frame(AVFormatContext *s, ByteIOContext *pb, if(vst->slices != vst->cur_slice) //FIXME find out how to set slices correct from the begin memmove(pkt->data + 1 + 8*vst->cur_slice, pkt->data + 1 + 8*vst->slices, vst->videobufpos - 1 - 8*vst->slices); - pkt->size += 8*(vst->cur_slice - vst->slices); + pkt->size = vst->videobufpos + 8*(vst->cur_slice - vst->slices); pkt->pts = AV_NOPTS_VALUE; pkt->pos = vst->pktpos; return 0; -- cgit v1.2.3