aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/wavpack.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-05-27 19:13:14 +0200
committerAnton Khirnov <anton@khirnov.net>2013-05-28 17:47:24 +0200
commit89806691b1c39181c63d95e0fddc30f11e2a7b04 (patch)
tree66fbee4bb00e6297ac427e43c9f202fd9ece7087 /libavcodec/wavpack.c
parenteae1b8451a4d606dd457736ce7240ee12535fb36 (diff)
downloadffmpeg-89806691b1c39181c63d95e0fddc30f11e2a7b04.tar.gz
wavpack: check that all the channels were coded.
Diffstat (limited to 'libavcodec/wavpack.c')
-rw-r--r--libavcodec/wavpack.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index 7a14519bf9..0847238595 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -1212,6 +1212,11 @@ static int wavpack_decode_frame(AVCodecContext *avctx, void *data,
buf_size -= frame_size;
}
+ if (s->ch_offset != avctx->channels) {
+ av_log(avctx, AV_LOG_ERROR, "Not enough channels coded in a packet.\n");
+ return AVERROR_INVALIDDATA;
+ }
+
*got_frame_ptr = 1;
return avpkt->size;