mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/j2kenc: Fix out of array access in encode_cblk()
Fixes: 4427/clusterfuzz-testcase-minimized-5106919271301120
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 0674087004
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
f42e64a21f
commit
ad780b0b91
|
@ -663,6 +663,7 @@ static void encode_cblk(Jpeg2000EncoderContext *s, Jpeg2000T1Context *t1, Jpeg20
|
||||||
cblk->ninclpasses = passno;
|
cblk->ninclpasses = passno;
|
||||||
|
|
||||||
// TODO: optional flush on each pass
|
// TODO: optional flush on each pass
|
||||||
|
if (passno)
|
||||||
cblk->passes[passno-1].rate = ff_mqc_flush(&t1->mqc);
|
cblk->passes[passno-1].rate = ff_mqc_flush(&t1->mqc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue