changeset 9659:b4350a6fb24a libavcodec

ac3dec: fix coupling range check. the start subband must be less than the end subband.
author jbr
date Sat, 16 May 2009 17:02:44 +0000
parents 67a20f0eb42c
children 6d75bcdeaa30
files ac3dec.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ac3dec.c	Sat May 16 14:17:08 2009 +0000
+++ b/ac3dec.c	Sat May 16 17:02:44 2009 +0000
@@ -872,8 +872,8 @@
             /* TODO: modify coupling end freq if spectral extension is used */
             cpl_start_subband = get_bits(gbc, 4);
             cpl_end_subband   = get_bits(gbc, 4) + 3;
-            if (cpl_start_subband > cpl_end_subband) {
-                av_log(s->avctx, AV_LOG_ERROR, "invalid coupling range (%d > %d)\n",
+            if (cpl_start_subband >= cpl_end_subband) {
+                av_log(s->avctx, AV_LOG_ERROR, "invalid coupling range (%d >= %d)\n",
                        cpl_start_subband, cpl_end_subband);
                 return -1;
             }