Browse Source

mace: check channel count, fixes FPE

Fixes ticket1391

Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.0
Michael Niedermayer 13 years ago
parent
commit
6df1cfa7e4
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/mace.c

+ 1
- 1
libavcodec/mace.c View File

@@ -231,7 +231,7 @@ static av_cold int mace_decode_init(AVCodecContext * avctx)
{
MACEContext *ctx = avctx->priv_data;

if (avctx->channels > 2)
if (avctx->channels > 2 || avctx->channels <= 0)
return -1;
avctx->sample_fmt = AV_SAMPLE_FMT_S16;



Loading…
Cancel
Save