lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 15 Jul 2006 23:08:49 +0000
From:	Robert Fitzsimons <robfitz@...k.net>
To:	Andrew Morton <akpm@...l.org>
Cc:	"Randy.Dunlap" <rdunlap@...otime.net>, greg@...ah.com,
	76306.1226@...puserve.com, fork0@...nline.de,
	linux-kernel@...r.kernel.org, mchehab@...radead.org,
	shemminger@...l.org, video4linux-list@...hat.com,
	v4l-dvb-maintainer@...uxtv.org
Subject: [PATCH] V4L: struct video_device corruption

The layout of struct video_device would change depending on whether
videodev.h (V4L1) was include or not before v4l2-dev.h, which caused
the structure to get corrupted.  Include the vidiocgmbuf function
pointer in video_device regardless of the V4L version.

Signed-off-by: Robert Fitzsimons <robfitz@...k.net>
---
 include/media/v4l2-dev.h |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index 62dae1a..69059d8 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -194,10 +194,11 @@ struct video_device
 
 
 	int (*vidioc_overlay) (struct file *file, void *fh, unsigned int i);
-#ifdef HAVE_V4L1
-			/* buffer type is struct vidio_mbuf * */
+	/*
+	 * vidiocgmbuf is part of the V4L1 API
+	 * buffer type is struct vidio_mbuf *
+	 */
 	int (*vidiocgmbuf)  (struct file *file, void *fh, struct video_mbuf *p);
-#endif
 	int (*vidioc_g_fbuf)   (struct file *file, void *fh,
 				struct v4l2_framebuffer *a);
 	int (*vidioc_s_fbuf)   (struct file *file, void *fh,
-- 
1.4.1.ga3e6

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ