diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-12-24 21:26:52 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-12-24 21:26:52 +0100 |
commit | 66f71f3b5e2e7b6e5049bd9831c371e16aff8a53 (patch) | |
tree | 0ee7d443e3ad1846e024f5630825da2975c016f0 | |
parent | fc5c49ab3247533e0a5cb203cf7122143389eb5c (diff) | |
download | ffmpeg-66f71f3b5e2e7b6e5049bd9831c371e16aff8a53.tar.gz |
rmdec: Avoid allocating huge packets
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/rmdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index 5b9bfb869a..75240236e8 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -24,6 +24,7 @@ #include "libavutil/dict.h" #include "avformat.h" #include "internal.h" +#include "avio_internal.h" #include "riff.h" #include "rm.h" @@ -612,6 +613,7 @@ static int rm_assemble_video_frame(AVFormatContext *s, AVIOContext *pb, } if(type != 1){ // not whole frame len2 = get_num(pb, &len); + len2 = ffio_limit(pb, len2); pos = get_num(pb, &len); pic_num = avio_r8(pb); len--; } |