From 0f6ba0d15f43e2be8cae9e3906aa03fcfe231e5b Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Sun, 13 Jul 2014 17:17:17 +0200 Subject: [PATCH] i2c: stub: Avoid an array overrun on I2C block transfers I2C block transfers can have a size up to 32 bytes. If starting close to the end of the address space, there may not be enough room to write that many bytes (on I2C block writes) or not enough bytes to be read (on I2C block reads.) In that case, we must shorten the transfer so that it does not exceed the address space. Signed-off-by: Jean Delvare Reviewed-by: Guenter Roeck Signed-off-by: Wolfram Sang --- Reading git-format-patch failed