avcodec/mjpegdec: Fix order of condition for pal8
authorMichael Niedermayer <michael@niedermayer.cc>
Mon, 10 May 2021 19:30:35 +0000 (21:30 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 2 Jun 2021 20:35:36 +0000 (22:35 +0200)
commit06d23c6f3f72c66364f6f0d2ab2eeac55daab6a8
treeb033db90227a3cfd6e3b947eb661c6f2e363be00
parent996797f8ed06e6ccb5287e18a5de88b2b0db31ec
avcodec/mjpegdec: Fix order of condition for pal8

Fixes: out of array access
Fixes: 33960/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THP_fuzzer-5052852809629696
Fixes: 34163/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THP_fuzzer-6123678099177472

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/mjpegdec.c