Fix possible infinite loop decoding als.
authorPhilippe Saint-Pierre <stpere at gmail.com>
Wed, 4 Jan 2012 20:00:06 +0000 (21:00 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 4 Jan 2012 21:18:53 +0000 (22:18 +0100)
Reviewed-by: Thilo Borgmann
(cherry picked from commit f0f2babca23a3d099bcd5a1e18cf5d0eae2f4ef3)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/alsdec.c

index 0e5509c..9d371de 100644 (file)
@@ -1012,7 +1012,7 @@ static void zero_remaining(unsigned int b, unsigned int b_max,
     unsigned int count = 0;
 
     while (b < b_max)
-        count += div_blocks[b];
+        count += div_blocks[b++];
 
     if (count)
         memset(buf, 0, sizeof(*buf) * count);