aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/alsdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-11 01:21:06 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-11 01:24:35 +0100
commit43f925536844c6a7f24f104a4cc540d860c88ae0 (patch)
tree2d8b4911f5e201314e9756457241739e80cffc86 /libavcodec/alsdec.c
parent42874666a6cb53fac4eec99eff27f8975b799f92 (diff)
parent2a0fb7286d67c47e44aa76c237ede117b22af616 (diff)
downloadffmpeg-43f925536844c6a7f24f104a4cc540d860c88ae0.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: alsdec: check block length See: 0ceca269b66ec12a23bf0907bd2c220513cdbf16 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/alsdec.c')
-rw-r--r--libavcodec/alsdec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index 825949f6a7..f554eaa5a9 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -1391,6 +1391,11 @@ static int read_frame_data(ALSDecContext *ctx, unsigned int ra_frame)
for (b = 0; b < ctx->num_blocks; b++) {
bd.block_length = div_blocks[b];
+ if (bd.block_length <= 0) {
+ av_log(ctx->avctx, AV_LOG_WARNING,
+ "Invalid block length %d in channel data!\n", bd.block_length);
+ continue;
+ }
for (c = 0; c < avctx->channels; c++) {
bd.const_block = ctx->const_block + c;