summaryrefslogtreecommitdiff
path: root/libavcodec/4xm.c
diff options
context:
space:
mode:
authorLaurent Aimar <fenrir@videolan.org>2011-10-01 02:04:45 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-02 16:48:58 +0200
commitdb5b4875514eb7740844f514dbf236c9179a6a93 (patch)
tree334700123d3cd0873e797a3bf0f8a582e24fc080 /libavcodec/4xm.c
parent2a9046c741e7a2f64d7ebbd028963b4ce0b7820c (diff)
Reject video with non multiple of 16 width/height in the 4xm decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/4xm.c')
-rw-r--r--libavcodec/4xm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 94cfb82668..f2a82573b4 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -885,6 +885,10 @@ static av_cold int decode_init(AVCodecContext *avctx){
av_log(avctx, AV_LOG_ERROR, "extradata wrong or missing\n");
return 1;
}
+ if((avctx->width % 16) || (avctx->height % 16)) {
+ av_log(avctx, AV_LOG_ERROR, "unsupported width/height\n");
+ return AVERROR_INVALIDDATA;
+ }
avcodec_get_frame_defaults(&f->current_picture);
avcodec_get_frame_defaults(&f->last_picture);