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

Skip to content
Commit 81dae671 authored by Matthieu CASTET's avatar Matthieu CASTET Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (11832): dibusb_mc: fix i2c to not corrupt eeprom in case of strange read pattern



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
doing
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.

Signed-off-by: default avatarMatthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: default avatarPatrick Boettcher <pb@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent a9b8fe30
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