From: Tiffany Lin <tiffany.lin@mediatek.com>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
Hans Verkuil <hverkuil@xs4all.nl>
Cc: Eddie Huang <eddie.huang@mediatek.com>,
Yingjoe Chen <yingjoe.chen@mediatek.com>,
linux-media@vger.kernel.org, linux-mediatek@lists.infradead.org,
Tiffany Lin <tiffany.lin@mediatek.com>
Subject: [PATCH] media: v4l2-compat-ioctl32: fix missing length copy in put_v4l2_buffer32
Date: Thu, 14 Jan 2016 15:37:25 +0800 [thread overview]
Message-ID: <1452757045-34051-1-git-send-email-tiffany.lin@mediatek.com> (raw)
In v4l2-compliance utility, test QUERYBUF required correct length
value to go through each planar to check planar's length in multi-planar
Signed-off-by: Tiffany Lin <tiffany.lin@mediatek.com>
---
drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
index 327e83a..5ba932a 100644
--- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
+++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
@@ -521,6 +521,9 @@ static int put_v4l2_buffer32(struct v4l2_buffer *kp, struct v4l2_buffer32 __user
if (num_planes == 0)
return 0;
+ if (put_user(kp->length, &up->length))
+ return -EFAULT;
+
uplane = (__force struct v4l2_plane __user *)kp->m.planes;
if (get_user(p, &up->m.planes))
return -EFAULT;
--
1.7.9.5
next reply other threads:[~2016-01-14 7:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-14 7:37 Tiffany Lin [this message]
2016-01-14 7:53 ` [PATCH] media: v4l2-compat-ioctl32: fix missing length copy in put_v4l2_buffer32 Hans Verkuil
2016-01-15 3:05 ` tiffany lin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1452757045-34051-1-git-send-email-tiffany.lin@mediatek.com \
--to=tiffany.lin@mediatek.com \
--cc=eddie.huang@mediatek.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=mchehab@osg.samsung.com \
--cc=yingjoe.chen@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox