aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2008-12-06 16:33:16 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2008-12-06 16:33:16 +0000
commit2ceccf045c295b9a507d6e3be7710c63f51c0529 (patch)
tree09d39e91b5b5a942dfac79a4e09329e85a6514f1
parent97679e6e381971798da1dfcdd66b331240983d3d (diff)
downloadffmpeg-2ceccf045c295b9a507d6e3be7710c63f51c0529.tar.gz
ac3dec: simplify exponent bounds checking
Originally committed as revision 16022 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/ac3dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index b8f5796e3c..291d8f3ab4 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;