提交 9e9540b8 编写于 作者: A Adrian Bunk 提交者: David S. Miller

mISDN/dsp_cmx.c: fix size checks

The checks for ensuring that the array indices are inside the range
were flipped.
Reported-by: NAdrian Bunk <bunk@kernel.org>
Signed-off-by: NAdrian Bunk <bunk@kernel.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6bff338b
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册