diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-13 01:05:04 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-13 01:11:59 +0100 |
commit | 580021cfc45847d9d0fbbbfe4045c40cc56924bf (patch) | |
tree | 360ae0d06f8e5852269ffce6979f4fb01ecfc460 /libavcodec/wavpack.c | |
parent | e9cb533fbb90c274cfed07b69ebf5c1989573e20 (diff) | |
download | ffmpeg-streaming-580021cfc45847d9d0fbbbfe4045c40cc56924bf.zip ffmpeg-streaming-580021cfc45847d9d0fbbbfe4045c40cc56924bf.tar.gz |
wavpack: check ch_offset
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/wavpack.c')
-rw-r--r-- | libavcodec/wavpack.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index 2935abf..b36fa0a 100644 --- a/libavcodec/wavpack.c +++ b/libavcodec/wavpack.c @@ -789,6 +789,11 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no, return -1; } + if (wc->ch_offset >= avctx->channels) { + av_log(avctx, AV_LOG_ERROR, "too many channels\n"); + return -1; + } + memset(s->decorr, 0, MAX_TERMS * sizeof(Decorr)); memset(s->ch, 0, sizeof(s->ch)); s->extra_bits = 0; |