mirror of
https://github.com/DigitalDevices/dddvb.git
synced 2025-03-01 10:35:23 +00:00
do not allow unaligned access
This commit is contained in:
parent
ffbef1488e
commit
0c328cd989
@ -3334,6 +3334,8 @@ static long ddb_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||
return -EFAULT;
|
||||
if ((reg.reg & 0xfffffff) >= dev->regs_len)
|
||||
return -EINVAL;
|
||||
if (reg.reg & 3)
|
||||
return -EINVAL;
|
||||
reg.val = ddbreadl(dev, reg.reg);
|
||||
if (copy_to_user(parg, ®, sizeof(reg)))
|
||||
return -EFAULT;
|
||||
@ -3347,6 +3349,8 @@ static long ddb_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||
return -EFAULT;
|
||||
if ((reg.reg & 0xfffffff) >= dev->regs_len)
|
||||
return -EINVAL;
|
||||
if (reg.reg & 3)
|
||||
return -EINVAL;
|
||||
ddbwritel(dev, reg.val, reg.reg);
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user