mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
irda: fix read buffer overflow
io[i] is read before the bounds check on i, order should be reversed. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Samuel Ortiz <samuel@sortiz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
cb2f33e959
commit
5d5ceb8bdd
1 changed files with 1 additions and 1 deletions
|
@ -115,7 +115,7 @@ static int __init w83977af_init(void)
|
|||
|
||||
IRDA_DEBUG(0, "%s()\n", __func__ );
|
||||
|
||||
for (i=0; (io[i] < 2000) && (i < ARRAY_SIZE(dev_self)); i++) {
|
||||
for (i=0; i < ARRAY_SIZE(dev_self) && io[i] < 2000; i++) {
|
||||
if (w83977af_open(i, io[i], irq[i], dma[i]) == 0)
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue