summaryrefslogtreecommitdiff
path: root/libavcodec/cfhd.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-04-03 16:04:48 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-04-03 19:27:21 +0200
commitda8c86dd8be244100da226a11b416c20d0c914d6 (patch)
treea6e76741b77e977be48b02f621de112602c8dde4 /libavcodec/cfhd.h
parent3b88c88fa1888c47b0767d84bfebf1fd656c7846 (diff)
avcodec/cfhd: Keep track of which subbands have been read
This avoids use of uninitialized data also several checks are inside the band reading code so it is important that it is run at least once Fixes: out of array accesses Fixes: 28209/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-5684714694377472 Fixes: 32124/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-5425980681355264 Fixes: 30519/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-4558757155700736 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/cfhd.h')
-rw-r--r--libavcodec/cfhd.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/cfhd.h b/libavcodec/cfhd.h
index 4ec2a2ce8b..19e5c7cf03 100644
--- a/libavcodec/cfhd.h
+++ b/libavcodec/cfhd.h
@@ -114,6 +114,7 @@ typedef struct SubBand {
int width;
int a_height;
int height;
+ int8_t read_ok;
} SubBand;
typedef struct Plane {