Commit 161047f0 authored by Piotr Bandurski's avatar Piotr Bandurski Committed by Michael Niedermayer

rmdec: fix crash in case of oom

Fixes ticket #2724
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 38ce775e
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment