Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 0f6ba0d1 authored by Jean Delvare's avatar Jean Delvare Committed by Wolfram Sang
Browse files

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: default avatarJean Delvare <jdelvare@suse.de>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent b299de83
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment