[FFmpeg-devel] [PATCH v1 1/8] avformat/cinedec: check av_strdup() return value
Steven Liu
lq at chinaffmpeg.org
Thu Oct 10 06:40:04 EEST 2019
Signed-off-by: Steven Liu <lq at chinaffmpeg.org>
---
libavformat/cinedec.c | 4 ++++
1 file changed, 4 insertions(+)
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;
}
--
2.15.1
More information about the ffmpeg-devel
mailing list