aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/alsdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-16 16:43:59 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-16 17:57:12 +0200
commite28814e0e16c1de16789065124052a1201a5cf61 (patch)
tree38711a9d5be7032845c31a6a67ef5dc293183aad /libavcodec/alsdec.c
parent8582e6e9a3ce72fd7475c2ae8ed4c5198dc02a79 (diff)
parentd6e250abfc36b239ef0c1fc9d45d588b853bfcb9 (diff)
downloadffmpeg-e28814e0e16c1de16789065124052a1201a5cf61.tar.gz
Merge remote-tracking branch 'qatar/release/0.7' into release/0.8
* qatar/release/0.7: vorbis: Validate that the floor 1 X values contain no duplicates. vorbisenc: check all allocations for failure lavfi: avfilter_merge_formats: handle case where inputs are same alsdec: check opt_order. lavf: don't segfault when a NULL filename is passed to avformat_open_input() mpegvideo: Don't use ff_mspel_motion() for vc1 imgconvert: avoid undefined left shift in avcodec_find_best_pix_fmt nuv: check RTjpeg header for validity vc1dec: add flush function for WMV9 and VC-1 decoders ffmpeg: fix -force_key_frames mov: set AVCodecContext.width/height for h264 h264: allow cropping to AVCodecContext.width/height Conflicts: libavcodec/mpegvideo_common.h libavcodec/nuv.c libavcodec/vorbisenc.c libavfilter/formats.c 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 505af26b67..8a20b68880 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -662,6 +662,11 @@ static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd)
int opt_order_length = av_ceil_log2(av_clip((bd->block_length >> 3) - 1,
2, sconf->max_order + 1));
*bd->opt_order = get_bits(gb, opt_order_length);
+ if (*bd->opt_order > sconf->max_order) {
+ *bd->opt_order = sconf->max_order;
+ av_log(avctx, AV_LOG_ERROR, "Predictor order too large!\n");
+ return AVERROR_INVALIDDATA;
+ }
} else {
*bd->opt_order = sconf->max_order;
}