Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-12-22 01:41:49 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2016-12-22 01:41:49 +0300
commit9b9e4a71c57261b6b690d9649b8e7a347df6a78b (patch)
tree485a7e4399289fd7fbceda48451be2117999eb0e /libavformat/mpegenc.c
parentfd1fcb59dcdb0b1644097a69d0c64084bdc26052 (diff)
avformat/mpegenc: Check for av_mallocz() failure
Fixes CID1257787 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/mpegenc.c')
-rw-r--r--libavformat/mpegenc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index 878fa6381f..c77c3dfe41 100644
--- a/libavformat/mpegenc.c
+++ b/libavformat/mpegenc.c
@@ -1146,6 +1146,8 @@ static int mpeg_mux_write_packet(AVFormatContext *ctx, AVPacket *pkt)
stream->next_packet = &stream->premux_packet;
*stream->next_packet =
pkt_desc = av_mallocz(sizeof(PacketDesc));
+ if (!pkt_desc)
+ return AVERROR(ENOMEM);
pkt_desc->pts = pts;
pkt_desc->dts = dts;
pkt_desc->unwritten_size =