diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-07-24 11:09:26 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-07-24 11:31:14 +0200 |
commit | 82654172ced59236744bb7aceba822462f6b5750 (patch) | |
tree | cfb31c4aa466d56101c3cf4afd9300a14ba03510 /libavcodec/4xm.c | |
parent | a550926705fe29e1bc3c674ac302ef7912f02938 (diff) | |
parent | 2f034f255c49050e894ab9b88087c09ebe249f3f (diff) | |
download | ffmpeg-82654172ced59236744bb7aceba822462f6b5750.tar.gz |
Merge commit '2f034f255c49050e894ab9b88087c09ebe249f3f'
* commit '2f034f255c49050e894ab9b88087c09ebe249f3f':
4xm: Reject not a multiple of 16 dimension
The newly added checks are redundant and thus replaced by asserts
See: db5b4875514eb7740844f514dbf236c9179a6a93
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/4xm.c')
-rw-r--r-- | libavcodec/4xm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c index 6acdd56dc3..d66e130b65 100644 --- a/libavcodec/4xm.c +++ b/libavcodec/4xm.c @@ -842,6 +842,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, if (buf_size < 20) return AVERROR_INVALIDDATA; + av_assert0(avctx->width % 16 == 0 && avctx->height % 16 == 0); + if (buf_size < AV_RL32(buf + 4) + 8) { av_log(f->avctx, AV_LOG_ERROR, "size mismatch %d %d\n", buf_size, AV_RL32(buf + 4)); |