diff options
Diffstat (limited to 'libavcodec/ansi.c')
-rw-r--r-- | libavcodec/ansi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/ansi.c b/libavcodec/ansi.c index 4808ea7fff..19c88d8d51 100644 --- a/libavcodec/ansi.c +++ b/libavcodec/ansi.c @@ -94,6 +94,9 @@ static av_cold int decode_init(AVCodecContext *avctx) int ret = ff_set_dimensions(avctx, 80 << 3, 25 << 4); if (ret < 0) return ret; + } else if (avctx->width % FONT_WIDTH || avctx->height % s->font_height) { + av_log(avctx, AV_LOG_ERROR, "Invalid dimensions %d %d\n", avctx->width, avctx->height); + return AVERROR(EINVAL); } return 0; } |