diff options
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)); |