aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/movenc.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-08-31 20:21:00 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-08-31 20:21:00 +0000
commite8c4df40e399fc87c6167c5557c11e0d904ca720 (patch)
tree12b1932f8ac860654101e3b444e03f6e83a08a1c /libavformat/movenc.c
parentdb568c079a3c3a12b6fa2f478780fde94a6e88b5 (diff)
downloadffmpeg-e8c4df40e399fc87c6167c5557c11e0d904ca720.tar.gz
check for malloc failure
Originally committed as revision 15132 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r--libavformat/movenc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index f05987ecd6..1d96894075 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1616,6 +1616,8 @@ static int mov_write_packet(AVFormatContext *s, AVPacket *pkt)
/* copy frame to create needed atoms */
trk->vosLen = size;
trk->vosData = av_malloc(size);
+ if (!trk->vosData)
+ return AVERROR(ENOMEM);
memcpy(trk->vosData, pkt->data, size);
}