Browse Source

Check for memory allocation failure of temp buffer

Originally committed as revision 11053 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Roberto Togni 18 years ago
parent
commit
52537534d2
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavformat/rmdec.c

+ 2
- 1
libavformat/rmdec.c View File

@@ -495,7 +495,8 @@ static int rm_assemble_video_frame(AVFormatContext *s, RMContext *rm, AVPacket *
if((seq & 0x7F) == 1 || rm->curpic_num != pic_num){
rm->slices = ((hdr & 0x3F) << 1) + 1;
ssize = len2 + 8*rm->slices + 1;
rm->videobuf = av_realloc(rm->videobuf, ssize);
if(!(rm->videobuf = av_realloc(rm->videobuf, ssize)))
return AVERROR(ENOMEM);
rm->videobufsize = ssize;
rm->videobufpos = 8*rm->slices + 1;
rm->cur_slice = 0;


Loading…
Cancel
Save