Browse Source

rmenc: Check memory allocation

Bug-Id: CID 1257832

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
tags/n2.7
Federico Tomassetti Luca Barbato 10 years ago
parent
commit
d3aa307da0
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/rmenc.c

+ 2
- 0
libavformat/rmenc.c View File

@@ -363,6 +363,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));



Loading…
Cancel
Save