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:
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 26c496c769..1fdd0cb0fe 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -348,6 +348,11 @@ static av_cold int read_specific_config(ALSDecContext *ctx)
if (als_id != MKBETAG('A','L','S','\0'))
return AVERROR_INVALIDDATA;
+ if (avctx->channels > FF_SANE_NB_CHANNELS) {
+ avpriv_request_sample(avctx, "Huge number of channels\n");
+ return AVERROR_PATCHWELCOME;
+ }
+
ctx->cur_frame_length = sconf->frame_length;
// read channel config