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, 19 Aug 2006 18:19:27 +0200
From:	Eric Sesterhenn <snakebyte@....de>
To:	linux-kernel@...r.kernel.org
Cc:	mchehab@...radead.org
Subject: [Patch] Fix signedness error in drivers/media/video/vivi.c

hi,

when checking the -Wextra signedness warnings issued by gcc 4.1
I came across this one:

drivers/media/video/vivi.c:1001: warning: comparison of unsigned expression < 0 is always false

Since videobuf_reqbufs() returns negative values on errors the current
code does no real error checking since gcc removes the comparison.
This patch fixes this issue by making ret a normal, signed integer.

Signed-off-by: Eric Sesterhenn <snakebyte@....de>

--- linux-2.6.18-rc4/drivers/media/video/vivi.c.orig	2006-08-19 18:13:45.000000000 +0200
+++ linux-2.6.18-rc4/drivers/media/video/vivi.c	2006-08-19 18:14:16.000000000 +0200
@@ -992,7 +992,8 @@ static int vidiocgmbuf (struct file *fil
 	struct vivi_fh  *fh=priv;
 	struct videobuf_queue *q=&fh->vb_vidq;
 	struct v4l2_requestbuffers req;
-	unsigned int i, ret;
+	unsigned int i;
+	int ret;
 
 	req.type   = q->type;
 	req.count  = 8;


-
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