scx200_acb: Fix the block transactions
commitc04f8dca8e1e3b055355bf5fa94d773b17f6f683
authorJean Delvare <khali@linux-fr.org>
Fri, 10 Nov 2006 23:13:32 +0000 (11 00:13 +0100)
committerAdrian Bunk <bunk@stusta.de>
Fri, 10 Nov 2006 23:13:32 +0000 (11 00:13 +0100)
tree4bc384b7274fb29355d1e94f3b877c41686cb49d
parentb88acf65abec97a9b44c42d921c930c4d62d7b5e
scx200_acb: Fix the block transactions

The scx200_acb i2c bus driver pretends to support SMBus block
transactions, but in fact it implements the more simple I2C block
transactions. Additionally, it lacks sanity checks on the length
of the block transactions, which could lead to a buffer overrun.

This fixes an oops reported by Alexander Atanasov:
http://marc.theaimsgroup.com/?l=linux-kernel&m=114970382125094

Thanks to Ben Gardner for fixing my bugs :)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
drivers/i2c/busses/scx200_acb.c