Browse Source

avcodec/utils: report insane channel count errors

More than 64 is not *that* insane, so let's report the error at least.

Signed-off-by: Marton Balint <cus@passwd.hu>
tags/n4.1
Marton Balint 7 years ago
parent
commit
5982078e8d
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      libavcodec/utils.c

+ 1
- 0
libavcodec/utils.c View File

@@ -674,6 +674,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
av_freep(&avctx->subtitle_header);

if (avctx->channels > FF_SANE_NB_CHANNELS) {
av_log(avctx, AV_LOG_ERROR, "Too many channels: %d\n", avctx->channels);
ret = AVERROR(EINVAL);
goto free_and_end;
}


Loading…
Cancel
Save