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:	Tue, 16 Dec 2008 08:13:26 +0100
From:	Németh Márton <nm127@...email.hu>
To:	mschimek@....at, video4linux-list@...hat.com
CC:	LKML <linux-kernel@...r.kernel.org>, em28xx@...ntral.de
Subject: parameter of VIDIOC_G_INPUT and VIDIOC_S_INPUT?

Hi,

I have a question about the parameter of VIDIOC_G_INPUT and VIDIOC_S_INPUT
parameters in v4l2 specification.

The "Video for Linux Two API Specification" text says that the
parameter of VIDIOC_G_INPUT and VIDIOC_S_INPUT is ...

> [...] a pointer to an integer where the driver stores the number
> of the input, as in the struct v4l2_input index field.
>
> http://v4l2spec.bytesex.org/spec/r11217.htm

In the v4l2_input structure the index has the type of __u32.

In contrast, in <linux/videodev2.h> (as of 2.6.27) the ioctls are defined
as follows:

> #define VIDIOC_G_INPUT		_IOR('V', 38, int)
> #define VIDIOC_S_INPUT		_IOWR('V', 39, int)

The problem is that '__u32' is unsigned and 'int' is signed. Furthermore
one cannot be sure that sizeof(__u32) == sizeof(int) on all platforms.

I guess that the parameter of VIDIOC_G_INPUT and VIDIOC_S_INPUT should be
a pointer to __u32. What do you think?

Regards,

	Márton Németh
--
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