Merge remote-tracking branch 'qatar/release/0.7' into release/0.8
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 21 Aug 2011 20:44:58 +0000 (22:44 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 21 Aug 2011 20:44:58 +0000 (22:44 +0200)
* qatar/release/0.7:
  cavs: fix some crashes with invalid bitstreams
  jpegdec: actually search for and parse RSTn

Conflicts:
libavcodec/mjpegdec.c

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

@@@ -125,6 -124,6 +125,8 @@@ static int decode_residual_block(AVSCon
          level_code = get_ue_code(gb,r->golomb_order);
          if(level_code >= ESCAPE_CODE) {
              run = ((level_code - ESCAPE_CODE) >> 1) + 1;
++            if(run > 64)
++                return -1;
              esc_code = get_ue_code(gb,esc_golomb_order);
              level = esc_code + (run > r->max_run ? 1 : r->level_add[run]);
              while(level > r->inc_limit)
Simple merge