提交 5c6c9c48 编写于 作者: K Katsuhiro Suzuki 提交者: Mauro Carvalho Chehab

media: dvb_frontend: fix wrong cast in compat_ioctl

FE_GET_PROPERTY has always failed as following situations:
  - Use compatible ioctl
  - The array of 'struct dtv_property' has 2 or more items

This patch fixes wrong cast to a pointer 'struct dtv_property' from a
pointer of 2nd or after item of 'struct compat_dtv_property' array.
Signed-off-by: NKatsuhiro Suzuki <suzuki.katsuhiro@socionext.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 732a9edc
...@@ -2089,7 +2089,7 @@ static int dvb_frontend_handle_compat_ioctl(struct file *file, unsigned int cmd, ...@@ -2089,7 +2089,7 @@ static int dvb_frontend_handle_compat_ioctl(struct file *file, unsigned int cmd,
} }
for (i = 0; i < tvps->num; i++) { for (i = 0; i < tvps->num; i++) {
err = dtv_property_process_get( err = dtv_property_process_get(
fe, &getp, (struct dtv_property *)tvp + i, file); fe, &getp, (struct dtv_property *)(tvp + i), file);
if (err < 0) { if (err < 0) {
kfree(tvp); kfree(tvp);
return err; return err;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册