Commit 2f4568e5 authored by Baptiste Coudurier's avatar Baptiste Coudurier

return error if malloc fails

Originally committed as revision 12262 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent dbb7cbf2
......@@ -255,6 +255,8 @@ static int mov_read_dref(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
len += 1;
if (type == 2) { // absolute path
dref->path = av_mallocz(len+1);
if (!dref->path)
return AVERROR(ENOMEM);
get_buffer(pb, dref->path, len);
if (len > volume_len && !strncmp(dref->path, volume, volume_len)) {
len -= volume_len;
......
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