From f0f2babca23a3d099bcd5a1e18cf5d0eae2f4ef3 Mon Sep 17 00:00:00 2001
From: Philippe Saint-Pierre <stpere at gmail.com>
Date: Wed, 4 Jan 2012 21:00:06 +0100
Subject: [PATCH] Fix possible infinite loop decoding als.

Reviewed-by: Thilo Borgmann
---
 libavcodec/alsdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index 0e5509c74a4..9d371de0c8b 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -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);
-- 
GitLab