Mercurial > libavcodec.hg
changeset 8275:e2ef97f0ab4b libavcodec
ac3dec: simplify exponent bounds checking
author | jbr |
---|---|
date | Sat, 06 Dec 2008 16:33:16 +0000 |
parents | 82dbfe8d2e0b |
children | 9149588e5cc9 |
files | ac3dec.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ac3dec.c Sat Dec 06 16:28:48 2008 +0000 +++ b/ac3dec.c Sat Dec 06 16:33:16 2008 +0000 @@ -392,7 +392,7 @@ 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;