Skip to content
Snippets Groups Projects
Commit 88b4116e authored by George Cherian's avatar George Cherian Committed by Wolfram Sang
Browse files

i2c: xlp9xx: Make sure the transfer size is not more than I2C_SMBUS_BLOCK_SIZE


For SMBus transactions the max permissible transfer size is
I2C_SMBUS_BLOCK_SIZE. It is possible that some clients might
not follow it strictly occasionally.
This would lead to stack corruption if the driver copies more than
I2C_SMBUS_BLOCK_SIZE bytes. Add a check to avoid such conditions.

Signed-off-by: default avatarJayachandran C <jnair@caviumnetworks.com>
Signed-off-by: default avatarGeorge Cherian <george.cherian@cavium.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 8d504d80
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment