diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-02-27 09:30:56 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-02-27 09:30:56 +0000 |
commit | 2f4568e525ffbc253bd7777b5cb6bf3706988cae (patch) | |
tree | 51b3e00f2f5f732d6edf24c3c641528f308e5976 /libavformat/mov.c | |
parent | dbb7cbf26ed44d258c56e976de3300d87b716875 (diff) | |
download | ffmpeg-2f4568e525ffbc253bd7777b5cb6bf3706988cae.tar.gz |
return error if malloc fails
Originally committed as revision 12262 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 75746bd410..3a18e662c2 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -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; |