You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
rmenc: Check memory allocation
Bug-Id: CID 1257832 Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
committed by
Luca Barbato
parent
7ebb302229
commit
d3aa307da0
@@ -363,6 +363,8 @@ static int rm_write_audio(AVFormatContext *s, const uint8_t *buf, int size, int
|
|||||||
|
|
||||||
/* XXX: suppress this malloc */
|
/* XXX: suppress this malloc */
|
||||||
buf1 = av_malloc(size * sizeof(uint8_t));
|
buf1 = av_malloc(size * sizeof(uint8_t));
|
||||||
|
if (!buf1)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
write_packet_header(s, stream, size, !!(flags & AV_PKT_FLAG_KEY));
|
write_packet_header(s, stream, size, !!(flags & AV_PKT_FLAG_KEY));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user