Merge commit '3ca14aa5964ea5d11f7a15f9fff17924d6096d44'
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 20 Sep 2013 12:56:00 +0000 (14:56 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 20 Sep 2013 12:58:07 +0000 (14:58 +0200)
* commit '3ca14aa5964ea5d11f7a15f9fff17924d6096d44':
  rl2: Avoid a division by zero

See: f371396dfb95c116a05e9b9f690fa916bb2d815e
Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavformat/rl2.c

@@@ -136,9 -140,6 +136,11 @@@ static av_cold int rl2_read_header(AVFo
  
      /** setup audio stream if present */
      if(sound_rate){
-         if(channels <= 0)
++        if (!channels || channels > 42) {
++            av_log(s, AV_LOG_ERROR, "Invalid number of channels: %d\n", channels);
 +            return AVERROR_INVALIDDATA;
++        }
 +
          pts_num = def_sound_size;
          pts_den = rate;