OSDN Git Service

Merge commit '2f034f255c49050e894ab9b88087c09ebe249f3f'
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 24 Jul 2013 09:09:26 +0000 (11:09 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 24 Jul 2013 09:31:14 +0000 (11:31 +0200)
* commit '2f034f255c49050e894ab9b88087c09ebe249f3f':
  4xm: Reject not a multiple of 16 dimension

The newly added checks are redundant and thus replaced by asserts

See: db5b4875514eb7740844f514dbf236c9179a6a93
Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/4xm.c

@@@ -842,6 -807,12 +842,8 @@@ static int decode_frame(AVCodecContext 
      if (buf_size < 20)
          return AVERROR_INVALIDDATA;
  
 -    if (avctx->width % 16 || avctx->height % 16) {
 -        av_log(avctx, AV_LOG_ERROR,
 -               "Dimensions non-multiple of 16 are invalid.\n");
 -        return AVERROR_INVALIDDATA;
 -    }
++    av_assert0(avctx->width % 16 == 0 && avctx->height % 16 == 0);
      if (buf_size < AV_RL32(buf + 4) + 8) {
          av_log(f->avctx, AV_LOG_ERROR, "size mismatch %d %d\n",
                 buf_size, AV_RL32(buf + 4));