Merge commit 'ed50673066956d6f2201a57c3254569f2ab08d9d'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 19 May 2013 08:27:11 +0000 (10:27 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 19 May 2013 08:38:08 +0000 (10:38 +0200)
* commit 'ed50673066956d6f2201a57c3254569f2ab08d9d':
  wavpack: validate samples size parsed in wavpack_decode_block

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

@@@ -807,6 -796,9 +807,11 @@@ static int wavpack_decode_block(AVCodec
      if (!wc->mkv_mode) {
          s->samples = AV_RL32(buf);
          buf       += 4;
 -        if (s->samples != wc->samples)
++        if (s->samples != wc->samples) {
++            av_log(avctx, AV_LOG_ERROR, "mismatching sample count in block");
+             return AVERROR_INVALIDDATA;
++        }
          if (!s->samples) {
              *got_frame_ptr = 0;
              return 0;