[FFmpeg-cvslog] r11053 - trunk/libavformat/rmdec.c
rtogni
subversion
Sun Nov 18 23:49:42 CET 2007
Author: rtogni
Date: Sun Nov 18 23:49:41 2007
New Revision: 11053
Log:
Check for memory allocation failure of temp buffer
Modified:
trunk/libavformat/rmdec.c
Modified: trunk/libavformat/rmdec.c
==============================================================================
--- trunk/libavformat/rmdec.c (original)
+++ trunk/libavformat/rmdec.c Sun Nov 18 23:49:41 2007
@@ -495,7 +495,8 @@ static int rm_assemble_video_frame(AVFor
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;
More information about the ffmpeg-cvslog
mailing list