OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d039e7
)
wavpack: check that there aren't too many blocks per packet
author
Anton Khirnov
<anton@khirnov.net>
Mon, 27 May 2013 17:11:09 +0000
(19:11 +0200)
committer
Anton Khirnov
<anton@khirnov.net>
Tue, 28 May 2013 15:47:17 +0000
(17:47 +0200)
libavcodec/wavpack.c
patch
|
blob
|
history
diff --git
a/libavcodec/wavpack.c
b/libavcodec/wavpack.c
index
9c766ca
..
7a14519
100644
(file)
--- a/
libavcodec/wavpack.c
+++ b/
libavcodec/wavpack.c
@@
-1120,6
+1120,11
@@
static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
}
}
+ if (wc->ch_offset + s->stereo >= avctx->channels) {
+ av_log(avctx, AV_LOG_WARNING, "Too many channels coded in a packet.\n");
+ return (avctx->err_recognition & AV_EF_EXPLODE) ? AVERROR_INVALIDDATA : 0;
+ }
+
samples_l = frame->extended_data[wc->ch_offset];
if (s->stereo)
samples_r = frame->extended_data[wc->ch_offset + 1];