Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-28 01:36:37 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-01-28 18:42:18 +0400
commit4484c722f68e6a54b8bd701d391897bc092b4404 (patch)
tree9f579dc86e63e78d3290c94d7cc50a5fef19c091 /libavcodec/alsdec.c
parent1146bbc5a630db5169e51a9185292f88b1de6933 (diff)
alsdec/read_specific_config: check for init_get_bits failure
This also fixes a potential integer overflow Reviewed-by: Paul B Mahol <onemda@gmail.com> Reviewed-by: Thilo Borgmann <thilo.borgmann@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/alsdec.c')
-rw-r--r--libavcodec/alsdec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index d7baa6eccb..524be227b3 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -289,8 +289,10 @@ static av_cold int read_specific_config(ALSDecContext *ctx)
ALSSpecificConfig *sconf = &ctx->sconf;
AVCodecContext *avctx = ctx->avctx;
uint32_t als_id, header_size, trailer_size;
+ int ret;
- init_get_bits(&gb, avctx->extradata, avctx->extradata_size * 8);
+ if ((ret = init_get_bits8(&gb, avctx->extradata, avctx->extradata_size)) < 0)
+ return ret;
config_offset = avpriv_mpeg4audio_get_config(&m4ac, avctx->extradata,
avctx->extradata_size * 8, 1);