diff options
author | Alex Converse <alex.converse@gmail.com> | 2012-01-12 23:12:24 +0400 |
---|---|---|
committer | Alex Converse <alex.converse@gmail.com> | 2012-01-13 01:26:13 +0400 |
commit | 4df30f71147b7bedd4457bcfa0e4efe01085af9f (patch) | |
tree | a6fec3f3b2deab2e07269d0b6ca21bd8e11be485 /libavcodec/utils.c | |
parent | 81dc6a2a3cefc1f1bbbc249052b3374e524d1ea0 (diff) |
utils: Check for extradata size overflows.
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 2bc1dcf5da..6f4d7e68da 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -610,6 +610,9 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD int ret = 0; AVDictionary *tmp = NULL; + if (avctx->extradata_size < 0 || avctx->extradata_size >= FF_MAX_EXTRADATA_SIZE) + return AVERROR(EINVAL); + if (options) av_dict_copy(&tmp, *options, 0); |