From 2ceccf045c295b9a507d6e3be7710c63f51c0529 Mon Sep 17 00:00:00 2001
From: Justin Ruggles <justin.ruggles@gmail.com>
Date: Sat, 6 Dec 2008 16:33:16 +0000
Subject: [PATCH] ac3dec: simplify exponent bounds checking

Originally committed as revision 16022 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 libavcodec/ac3dec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index b8f5796e3ce..291d8f3ab4a 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -392,7 +392,7 @@ static int decode_exponents(GetBitContext *gbc, int exp_strategy, int ngrps,
     prevexp = absexp;
     for(i=0,j=0; i<ngrps*3; i++) {
         prevexp += dexp[i] - 2;
-        if (prevexp < 0 || prevexp > 24)
+        if (prevexp > 24U)
             return -1;
         switch (group_size) {
             case 4: dexps[j++] = prevexp;
-- 
GitLab