summaryrefslogtreecommitdiffstats
path: root/libavformat/tests
diff options
context:
space:
mode:
authorSteven Liu <lq@chinaffmpeg.org>2017-01-06 06:35:32 +0800
committerSteven Liu <lq@chinaffmpeg.org>2017-01-06 06:35:32 +0800
commitd1f3e475f9807b445ba37ff2fd23f71c4645de79 (patch)
treee576895e1dae612bdf15290a63800b0ea4f342e9 /libavformat/tests
parent2d208aaabe2082895a4b4762a867296792503be3 (diff)
downloadffmpeg-streaming-d1f3e475f9807b445ba37ff2fd23f71c4645de79.zip
ffmpeg-streaming-d1f3e475f9807b445ba37ff2fd23f71c4645de79.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>
Diffstat (limited to 'libavformat/tests')
-rw-r--r--libavformat/tests/fifo_muxer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/tests/fifo_muxer.c b/libavformat/tests/fifo_muxer.c
index dc62965..e20bd6e 100644
--- a/libavformat/tests/fifo_muxer.c
+++ b/libavformat/tests/fifo_muxer.c
@@ -151,6 +151,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));
OpenPOWER on IntegriCloud