From b1071b405d57eb980f228f1ef17a97ca69cbf53f Mon Sep 17 00:00:00 2001 From: Steven Liu Date: Thu, 10 Oct 2019 10:52:52 +0800 Subject: [PATCH] avformat/mvdec: check av_strdup() return value Signed-off-by: Steven Liu --- libavformat/mvdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/mvdec.c b/libavformat/mvdec.c index 4f75dcacdb..f9f7e38137 100644 --- a/libavformat/mvdec.c +++ b/libavformat/mvdec.c @@ -211,6 +211,8 @@ static int parse_video_var(AVFormatContext *avctx, AVStream *st, } else if (!strcmp(name, "ORIENTATION")) { if (var_read_int(pb, size) == 1101) { st->codecpar->extradata = av_strdup("BottomUp"); + if (!st->codecpar->extradata) + return AVERROR(ENOMEM); st->codecpar->extradata_size = 9; } } else if (!strcmp(name, "Q_SPATIAL") || !strcmp(name, "Q_TEMPORAL")) {