summaryrefslogtreecommitdiff
path: root/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2023-03-02 13:57:30 +0100
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-03-20 00:32:56 +0100
commitd04794da9649ab49421a4f942937fbd52896bd3f (patch)
tree57ad5b103a4ea5a204e415e0f11ea65747e8c932 /drivers/media/v4l2-core/v4l2-compat-ioctl32.c
parentfc650d2eba1087589bbb6ede866756df13b9a9dc (diff)
downloadlwn-d04794da9649ab49421a4f942937fbd52896bd3f.tar.gz
lwn-d04794da9649ab49421a4f942937fbd52896bd3f.zip
media: v4l2-core: zero field base in struct v4l2_framebuffer
Make sure this field is always 0 since destructive overlays are no longer supported. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/v4l2-core/v4l2-compat-ioctl32.c')
-rw-r--r--drivers/media/v4l2-core/v4l2-compat-ioctl32.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
index e7baa2880eeb..f3bed37859a2 100644
--- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
+++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
@@ -587,14 +587,11 @@ struct v4l2_framebuffer32 {
static int get_v4l2_framebuffer32(struct v4l2_framebuffer *p64,
struct v4l2_framebuffer32 __user *p32)
{
- compat_caddr_t tmp;
-
- if (get_user(tmp, &p32->base) ||
- get_user(p64->capability, &p32->capability) ||
+ if (get_user(p64->capability, &p32->capability) ||
get_user(p64->flags, &p32->flags) ||
copy_from_user(&p64->fmt, &p32->fmt, sizeof(p64->fmt)))
return -EFAULT;
- p64->base = (void __force *)compat_ptr(tmp);
+ p64->base = NULL;
return 0;
}