diff options
author | Steven Liu <lq@chinaffmpeg.org> | 2017-01-06 06:35:32 +0800 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-14 12:20:15 +0200 |
commit | 7129dfdba86fdc3cbd00830efee5cdd59d9e34df (patch) | |
tree | 67d3ecf0b83b84b7a809c3e056045b5a3075a72d | |
parent | efc708afae75016192519ea4ba1387fedab0c369 (diff) | |
download | ffmpeg-7129dfdba86fdc3cbd00830efee5cdd59d9e34df.tar.gz |
avformat/test/fifo_muxer: add check for FailingMuxerPacketData alloc
CID: 1396257
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
(cherry picked from commit d1f3e475f9807b445ba37ff2fd23f71c4645de79)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/tests/fifo_muxer.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/tests/fifo_muxer.c b/libavformat/tests/fifo_muxer.c index 9659198ff1..413700ef70 100644 --- a/libavformat/tests/fifo_muxer.c +++ b/libavformat/tests/fifo_muxer.c @@ -150,6 +150,9 @@ static int prepare_packet(AVPacket *pkt,const FailingMuxerPacketData *pkt_data, { int ret; FailingMuxerPacketData *data = av_malloc(sizeof(*data)); + if (!data) { + return AVERROR(ENOMEM); + } memcpy(data, pkt_data, sizeof(FailingMuxerPacketData)); ret = av_packet_from_data(pkt, (uint8_t*) data, sizeof(*data)); |