Commit fca48541 authored by bcoudurier's avatar bcoudurier

check for malloc failure

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@15132 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 63a62539
...@@ -1616,6 +1616,8 @@ static int mov_write_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -1616,6 +1616,8 @@ static int mov_write_packet(AVFormatContext *s, AVPacket *pkt)
/* copy frame to create needed atoms */ /* copy frame to create needed atoms */
trk->vosLen = size; trk->vosLen = size;
trk->vosData = av_malloc(size); trk->vosData = av_malloc(size);
if (!trk->vosData)
return AVERROR(ENOMEM);
memcpy(trk->vosData, pkt->data, size); memcpy(trk->vosData, pkt->data, size);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment