[linux-dvb] [PATCH] DIBUSB_MC : fix i2c to not corrupt eeprom in case of strange read pattern
castet.matthieu at free.fr
Sat May 16 15:08:29 CEST 2009
dibusb_i2c_xfer seems to do things very dangerous :
it assumes that it get only write/read request or write request.
That means that read can be understood as write. For example a program
file = open("/dev/i2c-x", O_RDWR);
ioctl(file, I2C_SLAVE, 0x50)
read(file, data, 10)
will corrupt the eeprom as it will be understood as a write.
I attach a possible (untested) patch.
Signed-off-by: Matthieu CASTET <castet.matthieu at free.fr>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the linux-dvb