diff options
author | Steven Liu <lq@chinaffmpeg.org> | 2019-10-10 10:34:38 +0800 |
---|---|---|
committer | Steven Liu <lq@chinaffmpeg.org> | 2019-10-19 06:47:10 +0200 |
commit | 25f5d67a316b6868b4358e0b908bc19f00b9d357 (patch) | |
tree | f6f1dddc2f67b68f0567d6492d502bd187f3420b /libavformat/cinedec.c | |
parent | 0700e7247b83934c610a44e0312fb685c78e903c (diff) | |
download | ffmpeg-25f5d67a316b6868b4358e0b908bc19f00b9d357.tar.gz |
avformat/cinedec: check av_strdup() return value
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
Diffstat (limited to 'libavformat/cinedec.c')
-rw-r--r-- | libavformat/cinedec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/cinedec.c b/libavformat/cinedec.c index d27ebbba7b..0f2453cdf5 100644 --- a/libavformat/cinedec.c +++ b/libavformat/cinedec.c @@ -168,6 +168,10 @@ static int cine_read_header(AVFormatContext *avctx) avio_skip(pb, 616); // Binning .. bFlipH if (!avio_rl32(pb) ^ vflip) { st->codecpar->extradata = av_strdup("BottomUp"); + if (!st->codecpar->extradata) { + st->codecpar->extradata_size = 0; + return AVERROR(ENOMEM); + } st->codecpar->extradata_size = 9; } |