lavc/jpeg2000dec: Fix jp2 inner atom size used for overread checks.

This commit is contained in:
Carl Eugen Hoyos 2017-05-02 16:09:11 +02:00
parent b3570f0389
commit a75ef1506a
1 changed files with 1 additions and 0 deletions

View File

@ -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) {