[FFmpeg-cvslog] lavf/vividas: Do not increase extradata_size after allocation.
Carl Eugen Hoyos
git at videolan.org
Fri Dec 28 01:22:51 EET 2018
ffmpeg | branch: master | Carl Eugen Hoyos <ceffmpeg at gmail.com> | Sun Dec 23 00:34:57 2018 +0100| [17aed996bc35a020416e10075f1e6cc61b6cf805] | committer: Carl Eugen Hoyos
lavf/vividas: Do not increase extradata_size after allocation.
Avoids a crash in avcodec_parameters_from_context().
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=17aed996bc35a020416e10075f1e6cc61b6cf805
---
libavformat/vividas.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/vividas.c b/libavformat/vividas.c
index e199b05d69..00a1a0f6ef 100644
--- a/libavformat/vividas.c
+++ b/libavformat/vividas.c
@@ -392,7 +392,8 @@ static void track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t
offset += data_len[j];
}
- st->codecpar->extradata_size = offset;
+ if (offset < st->codecpar->extradata_size)
+ st->codecpar->extradata_size = offset;
}
}
More information about the ffmpeg-cvslog
mailing list