forked from FFmpeg/FFmpeg
avcodec/bintext: Check font height
Fixes: division by zero Fixes: 15257/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BINTEXT_fuzzer-5757352881422336 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
7a072fbcc4
commit
bfb58bdd70
1 changed files with 4 additions and 0 deletions
|
@ -63,6 +63,10 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||||
av_log(avctx, AV_LOG_ERROR, "not enough extradata\n");
|
av_log(avctx, AV_LOG_ERROR, "not enough extradata\n");
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
if (!s->font_height) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "invalid font height\n");
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
s->font_height = 8;
|
s->font_height = 8;
|
||||||
s->flags = 0;
|
s->flags = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue