From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
To: linuxtv-commits@linuxtv.org
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>,
Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
Hans Verkuil <hans.verkuil@cisco.com>,
stable@vger.kernel.org
Subject: [git:media_tree/master] [media] vb2: Fix an off by one error in 'vb2_plane_vaddr'
Date: Tue, 06 Jun 2017 10:10:39 +0000 [thread overview]
Message-ID: <E1dNHiM-0005Iy-GO@www.linuxtv.org> (raw)
This is an automatic generated email to let you know that the following patch were queued:
Subject: [media] vb2: Fix an off by one error in 'vb2_plane_vaddr'
Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Date: Fri Apr 28 01:51:40 2017 -0300
We should ensure that 'plane_no' is '< vb->num_planes' as done in
'vb2_plane_cookie' just a few lines below.
Fixes: e23ccc0ad925 ("[media] v4l: add videobuf2 Video for Linux 2 driver framework")
Cc: stable@vger.kernel.org
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/v4l2-core/videobuf2-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
index 94afbbf92807..c0175ea7e7ad 100644
--- a/drivers/media/v4l2-core/videobuf2-core.c
+++ b/drivers/media/v4l2-core/videobuf2-core.c
@@ -868,7 +868,7 @@ EXPORT_SYMBOL_GPL(vb2_core_create_bufs);
void *vb2_plane_vaddr(struct vb2_buffer *vb, unsigned int plane_no)
{
- if (plane_no > vb->num_planes || !vb->planes[plane_no].mem_priv)
+ if (plane_no >= vb->num_planes || !vb->planes[plane_no].mem_priv)
return NULL;
return call_ptr_memop(vb, vaddr, vb->planes[plane_no].mem_priv);
next reply other threads:[~2017-06-20 11:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-06 10:10 Mauro Carvalho Chehab [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-05-18 10:33 [git:media_tree/master] [media] vb2: Fix an off by one error in 'vb2_plane_vaddr' Mauro Carvalho Chehab
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=E1dNHiM-0005Iy-GO@www.linuxtv.org \
--to=mchehab@s-opensource.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=hans.verkuil@cisco.com \
--cc=linux-media@vger.kernel.org \
--cc=linuxtv-commits@linuxtv.org \
--cc=sakari.ailus@linux.intel.com \
--cc=stable@vger.kernel.org \
/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