diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-08-31 20:21:00 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-08-31 20:21:00 +0000 |
commit | e8c4df40e399fc87c6167c5557c11e0d904ca720 (patch) | |
tree | 12b1932f8ac860654101e3b444e03f6e83a08a1c | |
parent | db568c079a3c3a12b6fa2f478780fde94a6e88b5 (diff) | |
download | ffmpeg-e8c4df40e399fc87c6167c5557c11e0d904ca720.tar.gz |
check for malloc failure
Originally committed as revision 15132 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/movenc.c | 2 |
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); } |