[FFmpeg-cvslog] rmdec: fix crash in case of oom

Piotr Bandurski git at videolan.org
Fri Jul 12 04:27:15 CEST 2013


ffmpeg | branch: master | Piotr Bandurski <ami_stuff at o2.pl> | Wed Jul 10 17:14:48 2013 +0200| [161047f010b1d9dbc153a71c1ee75dc2a34561de] | committer: Michael Niedermayer

rmdec: fix crash in case of oom

Fixes ticket #2724

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

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=161047f010b1d9dbc153a71c1ee75dc2a34561de
---

 libavformat/rmdec.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 2c4ed49..70ae809 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -722,6 +722,8 @@ static int rm_assemble_video_frame(AVFormatContext *s, AVIOContext *pb,
 
     if(++vst->cur_slice > vst->slices)
         return 1;
+    if(!vst->pkt.data)
+        return AVERROR(ENOMEM);
     AV_WL32(vst->pkt.data - 7 + 8*vst->cur_slice, 1);
     AV_WL32(vst->pkt.data - 3 + 8*vst->cur_slice, vst->videobufpos - 8*vst->slices - 1);
     if(vst->videobufpos + len > vst->videobufsize)



More information about the ffmpeg-cvslog mailing list