public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [media] omap3isp: queue: fail QBUF if buffer is too small
@ 2011-08-04 15:40 Michael Jones
  2011-08-05  8:59 ` Laurent Pinchart
  2011-08-09  6:42 ` [PATCH v2] [media] omap3isp: queue: fail QBUF if user " Michael Jones
  0 siblings, 2 replies; 7+ messages in thread
From: Michael Jones @ 2011-08-04 15:40 UTC (permalink / raw)
  To: linux-media; +Cc: Laurent Pinchart, Mauro Carvalho Chehab

Add buffer length to sanity checks for QBUF.

Signed-off-by: Michael Jones <michael.jones@matrix-vision.de>
---
 drivers/media/video/omap3isp/ispqueue.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/omap3isp/ispqueue.c b/drivers/media/video/omap3isp/ispqueue.c
index 9c31714..4f6876f 100644
--- a/drivers/media/video/omap3isp/ispqueue.c
+++ b/drivers/media/video/omap3isp/ispqueue.c
@@ -867,6 +867,9 @@ int omap3isp_video_queue_qbuf(struct isp_video_queue *queue,
 	if (buf->state != ISP_BUF_STATE_IDLE)
 		goto done;
 
+	if (vbuf->length < buf->vbuf.length)
+		goto done;
+
 	if (vbuf->memory == V4L2_MEMORY_USERPTR &&
 	    vbuf->m.userptr != buf->vbuf.m.userptr) {
 		isp_video_buffer_cleanup(buf);
-- 
1.7.6


MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Erhard Meier

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-08-09  7:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-04 15:40 [PATCH] [media] omap3isp: queue: fail QBUF if buffer is too small Michael Jones
2011-08-05  8:59 ` Laurent Pinchart
2011-08-05 11:41   ` Michael Jones
2011-08-08 10:08     ` Laurent Pinchart
2011-08-08 10:16       ` Michael Jones
2011-08-09  6:42 ` [PATCH v2] [media] omap3isp: queue: fail QBUF if user " Michael Jones
2011-08-09  7:42   ` Laurent Pinchart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox