Skip to content

Commit

Permalink
mISDN/dsp_cmx.c: fix size checks
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Adrian Bunk authored and David S. Miller committed Oct 14, 2008
1 parent 6bff338 commit 9e9540b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/isdn/mISDN/dsp_cmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,10 +452,10 @@ dsp_cmx_hardware(struct dsp_conf *conf, struct dsp *dsp)
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;
Expand Down

0 comments on commit 9e9540b

Please sign in to comment.