summaryrefslogtreecommitdiff
path: root/libavformat/rmdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-12-31 02:47:54 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-12-31 02:47:54 +0000
commitce0453aac99c826ba0093f701e4dea67718ce457 (patch)
treec65270c389bb08b86a2d7a9a6a13f3b77a4d61ca /libavformat/rmdec.c
parent188e67eaf426fecfb28596e8bf529ef01f48a15c (diff)
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
Diffstat (limited to 'libavformat/rmdec.c')
-rw-r--r--libavformat/rmdec.c2
1 files changed, 1 insertions, 1 deletions
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;