Merge commit 'fd54dd028bc9f7bfb80ebf823a533dc84b73f936'
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 3 Jul 2013 12:38:37 +0000 (14:38 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 3 Jul 2013 12:38:37 +0000 (14:38 +0200)
* commit 'fd54dd028bc9f7bfb80ebf823a533dc84b73f936':
  jpeg2000: check len before parsing header
  jpeg2000: Check component number in get_coc() and get_qcc()

Conflicts:
libavcodec/jpeg2000dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/jpeg2000dec.c

@@@ -1279,9 -1241,10 +1284,10 @@@ static int jpeg2000_read_main_headers(J
          if (marker == JPEG2000_EOC)
              break;
  
 -        len = bytestream2_get_be16u(&s->g);
 +        len = bytestream2_get_be16(&s->g);
          if (len < 2 || bytestream2_get_bytes_left(&s->g) < len - 2)
              return AVERROR_INVALIDDATA;
          switch (marker) {
          case JPEG2000_SIZ:
              ret = get_siz(s);