aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-08-28 00:17:41 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2020-10-05 21:28:08 +0200
commit0ce90738fc1410ffa3b1abd92fef10557796bf4c (patch)
tree33ab2abdeee80ca659dc14785a9d5f6cb61032b1
parent71b1422ee93b0da778c0204b6cfaf4a6f1ac68d9 (diff)
downloadffmpeg-0ce90738fc1410ffa3b1abd92fef10557796bf4c.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>
-rw-r--r--libavcodec/cfhd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c
index 49a5a2c30a..fcd1902471 100644
--- a/libavcodec/cfhd.c
+++ b/libavcodec/cfhd.c
@@ -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);
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) {