Commit 56838103 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/rmenc: Check for av_malloc() failure

Fixes CID1257832
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent ca86e91d
......@@ -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));
......
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