From: Adrian Bunk Date: Tue, 14 Oct 2008 01:42:55 +0000 (-0700) Subject: mISDN/dsp_cmx.c: fix size checks X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9e9540b8f7b91c8818e2386add3b58a961459166;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git mISDN/dsp_cmx.c: fix size checks The checks for ensuring that the array indices are inside the range were flipped. Reported-by: Adrian Bunk Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: David S. Miller --- diff --git a/drivers/isdn/mISDN/dsp_cmx.c b/drivers/isdn/mISDN/dsp_cmx.c index e92b1ba4b45e..c2f51cc50760 100644 --- a/drivers/isdn/mISDN/dsp_cmx.c +++ b/drivers/isdn/mISDN/dsp_cmx.c @@ -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;