projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e11d014
)
Check for memory allocation failure of temp buffer
author
Roberto Togni
<r_togni@tiscali.it>
Sun, 18 Nov 2007 22:49:41 +0000
(22:49 +0000)
committer
Roberto Togni
<r_togni@tiscali.it>
Sun, 18 Nov 2007 22:49:41 +0000
(22:49 +0000)
Originally committed as revision 11053 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavformat/rmdec.c
patch
|
blob
|
history
diff --git
a/libavformat/rmdec.c
b/libavformat/rmdec.c
index
8793487
..
4fef4cd
100644
(file)
--- a/
libavformat/rmdec.c
+++ b/
libavformat/rmdec.c
@@
-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;