aboutsummaryrefslogtreecommitdiffstats
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 21:29:45 +0200
commit6b998720b29b5fd1c94b01903b0d05c1141fb0c2 (patch)
tree1a9a8ead425e65b486d86700fb9bf62f2e245328
parent55a070870facd6bc72f9b943baba2833ce24f075 (diff)
downloadffmpeg-6b998720b29b5fd1c94b01903b0d05c1141fb0c2.tar.gz
Reject video with non multiple of 16 width/height in the 4xm decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit db5b4875514eb7740844f514dbf236c9179a6a93)
-rw-r--r--libavcodec/4xm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 98169fd8ab..7344f4cd1f 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);