X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=libavcodec%2Fbintext.c;h=1aeed21f516746e7dc1aed76d21a31f25faecf04;hb=0a071f7124beaf0929f772a8618ac1b6c17b0222;hp=49b75c9e271ea8140d3f27fea763e248aa54c8b6;hpb=e645d7a6d452df83cedcbb1d6708429ceea156da;p=ffmpeg diff --git a/libavcodec/bintext.c b/libavcodec/bintext.c index 49b75c9e271..1aeed21f516 100644 --- a/libavcodec/bintext.c +++ b/libavcodec/bintext.c @@ -63,6 +63,10 @@ static av_cold int decode_init(AVCodecContext *avctx) av_log(avctx, AV_LOG_ERROR, "not enough extradata\n"); return AVERROR_INVALIDDATA; } + if (!s->font_height) { + av_log(avctx, AV_LOG_ERROR, "invalid font height\n"); + return AVERROR_INVALIDDATA; + } } else { s->font_height = 8; s->flags = 0;