mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
lavc/jpeg2000dec: Fix jp2 inner atom size used for overread checks.
This commit is contained in:
parent
b3570f0389
commit
a75ef1506a
@ -1982,6 +1982,7 @@ static int jp2_find_codestream(Jpeg2000DecoderContext *s)
|
||||
atom2_end = bytestream2_tell(&s->g) + atom2_size - 8;
|
||||
if (atom2_size < 8 || atom2_end > atom_end || atom2_end < atom2_size)
|
||||
break;
|
||||
atom2_size -= 8;
|
||||
if (atom2 == JP2_CODESTREAM) {
|
||||
return 1;
|
||||
} else if (atom2 == MKBETAG('c','o','l','r') && atom2_size >= 7) {
|
||||
|
Loading…
Reference in New Issue
Block a user