Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e9540b8 authored by Adrian Bunk's avatar Adrian Bunk Committed by David S. Miller
Browse files

mISDN/dsp_cmx.c: fix size checks



The checks for ensuring that the array indices are inside the range
were flipped.

Reported-by: default avatarAdrian Bunk <bunk@kernel.org>
Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6bff338b
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -452,10 +452,10 @@ one_member:
			if (finddsp->features.pcm_id == dsp->features.pcm_id) {
			if (finddsp->features.pcm_id == dsp->features.pcm_id) {
				if (finddsp->pcm_slot_rx >= 0 &&
				if (finddsp->pcm_slot_rx >= 0 &&
				    finddsp->pcm_slot_rx < sizeof(freeslots))
				    finddsp->pcm_slot_rx < sizeof(freeslots))
					freeslots[finddsp->pcm_slot_tx] = 0;
					freeslots[finddsp->pcm_slot_rx] = 0;
				if (finddsp->pcm_slot_tx >= 0 &&
				if (finddsp->pcm_slot_tx >= 0 &&
				    finddsp->pcm_slot_tx < sizeof(freeslots))
				    finddsp->pcm_slot_tx < sizeof(freeslots))
					freeslots[finddsp->pcm_slot_rx] = 0;
					freeslots[finddsp->pcm_slot_tx] = 0;
			}
			}
		}
		}
		i = 0;
		i = 0;