avcodec/cfhdenc: Height of 16 is not supported

Fixes: out of array access
Fixes: 68941/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-5990952685600768

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5dde255abd)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
release/7.0
Michael Niedermayer 6 months ago
parent 68a017f6b5
commit adcb97538a
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 4
      libavcodec/cfhdenc.c

@ -258,8 +258,8 @@ static av_cold int cfhd_encode_init(AVCodecContext *avctx)
if (ret < 0)
return ret;
if (avctx->height < 4) {
av_log(avctx, AV_LOG_ERROR, "Height must be >= 4.\n");
if (avctx->height < 32) {
av_log(avctx, AV_LOG_ERROR, "Height must be >= 32.\n");
return AVERROR_INVALIDDATA;
}

Loading…
Cancel
Save