diff options
author | Can Wu <wu.canus@gmail.com> | 2011-05-14 17:27:31 +0800 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-05-21 13:42:50 +0200 |
commit | 9e2dabed4a7bf21e3e0c0f4ddc895f8ed90fa839 (patch) | |
tree | 4438e94b89ae3bb9fd43e56c7524710eec1fc2c7 | |
parent | 7d4c4394b5c94a665cc807fb8b92ea153b6225b0 (diff) | |
download | ffmpeg-9e2dabed4a7bf21e3e0c0f4ddc895f8ed90fa839.tar.gz |
avio: check AVIOContext malloc failure
Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r-- | libavformat/aviobuf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 2b14d48ff5..fa63ddf2b9 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -113,6 +113,8 @@ AVIOContext *avio_alloc_context( int64_t (*seek)(void *opaque, int64_t offset, int whence)) { AVIOContext *s = av_mallocz(sizeof(AVIOContext)); + if (!s) + return NULL; ffio_init_context(s, buffer, buffer_size, write_flag, opaque, read_packet, write_packet, seek); return s; |