On 12/31/21 01:20, Wolfram Sang wrote:
- if (rdwr_arg.nmsgs > I2C_RDWR_IOCTL_MAX_MSGS) + if (!rdwr_arg.nmsgs || rdwr_arg.nmsgs > I2C_RDWR_IOCTL_MAX_MSGS) return -EINVAL;Shouldn't we check the msgs pointer as well while we are here? Like in the non-compat IOCTL code: 443 if (!rdwr_arg.msgs || rdwr_arg.nmsgs == 0) 444 return -EINVAL;
Sure! Will prepare v2, thanks for review With regards, Pavel Skripkin