X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Frmenc.c;h=838388f30d1778f8eb13d2423be37d43328d4920;hb=e8565d21c276ab9ac5ce785549420321fbd0b093;hp=d019e1beabd55c1515fe25853e60c2ce6abe7a7c;hpb=dfe5a9f022b38ba292212ce2daff60221e411e10;p=ffmpeg diff --git a/libavformat/rmenc.c b/libavformat/rmenc.c index d019e1beabd..838388f30d1 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));