]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
mISDN/dsp_cmx.c: fix size checks
authorAdrian Bunk <bunk@kernel.org>
Tue, 14 Oct 2008 01:42:55 +0000 (18:42 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Oct 2008 01:42:55 +0000 (18:42 -0700)
The checks for ensuring that the array indices are inside the range
were flipped.

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/mISDN/dsp_cmx.c

index e92b1ba4b45eb836d83ef101564c76311644ed2e..c2f51cc507608bada189220168178d05b34f908a 100644 (file)
@@ -452,10 +452,10 @@ one_member:
                        if (finddsp->features.pcm_id == dsp->features.pcm_id) {
                                if (finddsp->pcm_slot_rx >= 0 &&
                                    finddsp->pcm_slot_rx < sizeof(freeslots))
-                                       freeslots[finddsp->pcm_slot_tx] = 0;
+                                       freeslots[finddsp->pcm_slot_rx] = 0;
                                if (finddsp->pcm_slot_tx >= 0 &&
                                    finddsp->pcm_slot_tx < sizeof(freeslots))
-                                       freeslots[finddsp->pcm_slot_rx] = 0;
+                                       freeslots[finddsp->pcm_slot_tx] = 0;
                        }
                }
                i = 0;