indeo4: Decode all or nothing of a band header.
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 17 May 2018 11:40:38 +0000 (13:40 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 22 Oct 2018 23:44:40 +0000 (01:44 +0200)
commit876d3ee86209d1b1b86527f5121f1d1b0a412f7a
treea7fe8f68c011af3b6c2ff82457fbcaf2b3eff4a3
parentffe4ffa4ef7afbb2f5e576344c7dd7b2ba4201b1
indeo4: Decode all or nothing of a band header.

This avoids inconsistent value combinations.
Alternatively it would be possible to add more checks and careful use of
temporary variables, but my try of this quickly seemed to become
a rather large change.
The disadvantage of this, is that the struct is copied back and forth.

Fixes: index 6 out of bounds for type 'const uint16_t [5][16]'
Fixes: 6557/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO4_fuzzer-4787296550256640

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 10c8521265da86118597336c5589e26de377a374)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/indeo4.c