diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-02-22 19:29:14 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-22 19:47:40 +0300 |
commit | 56838103020385020469d1da076f0e4a6cbe15e5 (patch) | |
tree | 7bdc22bfd1782389089fc8e396df8c142671f76f /libavformat/rmenc.c | |
parent | ca86e91dd660ae9abc4f6eace620061ac695f847 (diff) |
avformat/rmenc: Check for av_malloc() failure
Fixes CID1257832
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rmenc.c')
-rw-r--r-- | libavformat/rmenc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/rmenc.c b/libavformat/rmenc.c index d019e1beab..838388f30d 100644 --- a/libavformat/rmenc.c +++ b/libavformat/rmenc.c @@ -364,6 +364,8 @@ static int rm_write_audio(AVFormatContext *s, const uint8_t *buf, int size, int /* XXX: suppress this malloc */ buf1 = av_malloc(size * sizeof(uint8_t)); + if (!buf1) + return AVERROR(ENOMEM); write_packet_header(s, stream, size, !!(flags & AV_PKT_FLAG_KEY)); |