mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/cfhd: Check transform type
Fixes: out of array access
Fixes: 24823/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-4855119863349248
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 659658d08b
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
71b1422ee9
commit
0ce90738fc
|
@ -444,6 +444,10 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame,
|
||||||
avpriv_report_missing_feature(avctx, "Transform type of %"PRIu16, data);
|
avpriv_report_missing_feature(avctx, "Transform type of %"PRIu16, data);
|
||||||
ret = AVERROR_PATCHWELCOME;
|
ret = AVERROR_PATCHWELCOME;
|
||||||
break;
|
break;
|
||||||
|
} else if (data == 1) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "unsupported transform type\n");
|
||||||
|
ret = AVERROR_PATCHWELCOME;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
av_log(avctx, AV_LOG_DEBUG, "Transform-type? %"PRIu16"\n", data);
|
av_log(avctx, AV_LOG_DEBUG, "Transform-type? %"PRIu16"\n", data);
|
||||||
} else if (abstag >= 0x4000 && abstag <= 0x40ff) {
|
} else if (abstag >= 0x4000 && abstag <= 0x40ff) {
|
||||||
|
|
Loading…
Reference in New Issue