Merge commit 'd8a45d2d49f54fde042b195f9d5859251252493d'
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 21 Mar 2015 11:08:14 +0000 (12:08 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 21 Mar 2015 11:09:03 +0000 (12:09 +0100)
* commit 'd8a45d2d49f54fde042b195f9d5859251252493d':
  h264_ps: properly check cropping parameters against overflow

Conflicts:
libavcodec/h264_ps.c

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

@@@ -460,12 -439,10 +460,12 @@@ int ff_h264_decode_seq_parameter_set(H2
  #endif
      sps->crop = get_bits1(&h->gb);
      if (sps->crop) {
-         int crop_left   = get_ue_golomb(&h->gb);
-         int crop_right  = get_ue_golomb(&h->gb);
-         int crop_top    = get_ue_golomb(&h->gb);
-         int crop_bottom = get_ue_golomb(&h->gb);
+         unsigned int crop_left   = get_ue_golomb(&h->gb);
+         unsigned int crop_right  = get_ue_golomb(&h->gb);
+         unsigned int crop_top    = get_ue_golomb(&h->gb);
+         unsigned int crop_bottom = get_ue_golomb(&h->gb);
 +        int width  = 16 * sps->mb_width;
 +        int height = 16 * sps->mb_height * (2 - sps->frame_mbs_only_flag);
  
          if (h->avctx->flags2 & CODEC_FLAG2_IGNORE_CROP) {
              av_log(h->avctx, AV_LOG_DEBUG, "discarding sps cropping, original "