[FFmpeg-cvslog] wavpack: check ch_offset
Michael Niedermayer
git at videolan.org
Tue Nov 13 01:41:21 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Nov 13 01:05:04 2012 +0100| [580021cfc45847d9d0fbbbfe4045c40cc56924bf] | committer: Michael Niedermayer
wavpack: check ch_offset
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=580021cfc45847d9d0fbbbfe4045c40cc56924bf
---
libavcodec/wavpack.c | 5 +++++
1 file changed, 5 insertions(+)
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;
More information about the ffmpeg-cvslog
mailing list