diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2017-05-02 17:09:11 +0300 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2017-05-03 04:45:33 +0300 |
commit | a75ef1506a62ff21f3e282d76978b28ffc305c64 (patch) | |
tree | d0047ca9c3cb492f926597063cbc767231d9b392 /libavcodec/jpeg2000dec.c | |
parent | b3570f03893cc6f29472f418a144252fe7a5e207 (diff) |
lavc/jpeg2000dec: Fix jp2 inner atom size used for overread checks.
Diffstat (limited to 'libavcodec/jpeg2000dec.c')
-rw-r--r-- | libavcodec/jpeg2000dec.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index e9f5f51af3..ab814cabe5 100644 --- a/libavcodec/jpeg2000dec.c +++ b/libavcodec/jpeg2000dec.c @@ -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) { |