diff options
Diffstat (limited to 'gst-libs/ext/libav/libavcodec/4xm.c')
-rw-r--r-- | gst-libs/ext/libav/libavcodec/4xm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gst-libs/ext/libav/libavcodec/4xm.c b/gst-libs/ext/libav/libavcodec/4xm.c index 99e0e2e..cc0361d 100644 --- a/gst-libs/ext/libav/libavcodec/4xm.c +++ b/gst-libs/ext/libav/libavcodec/4xm.c @@ -810,6 +810,12 @@ static int decode_frame(AVCodecContext *avctx, void *data, if (buf_size < 20) return AVERROR_INVALIDDATA; + if (avctx->width % 16 || avctx->height % 16) { + av_log(avctx, AV_LOG_ERROR, + "Dimensions non-multiple of 16 are invalid.\n"); + return AVERROR_INVALIDDATA; + } + 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)); |