diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-08-28 00:17:41 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-10-09 22:02:19 +0200 |
commit | bbc3425f60b2915b41c9a7d0f70d46c142739627 (patch) | |
tree | b3fae4c400ba1daa5e7b5a076e99b5b4dae3fc9c /libavcodec | |
parent | e4b4cf4ba7ba9f66ffcc224fff40e4db6939fc8d (diff) | |
download | ffmpeg-bbc3425f60b2915b41c9a7d0f70d46c142739627.tar.gz |
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 659658d08bb2e7219001795c78efd24f381446e2)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/cfhd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c index 5ea8f24821..1fc2e5e2b4 100644 --- a/libavcodec/cfhd.c +++ b/libavcodec/cfhd.c @@ -345,6 +345,10 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame, avpriv_report_missing_feature(avctx, "Transform type of %"PRIu16, data); ret = AVERROR_PATCHWELCOME; 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); } else if (abstag >= 0x4000 && abstag <= 0x40ff) { |