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]
Message-Id: <1156015188.19657.7.camel@alice>
Date:	Sat, 19 Aug 2006 21:19:48 +0200
From:	Eric Sesterhenn <snakebyte@....de>
To:	linux-kernel@...r.kernel.org
Cc:	osst@...de.org
Subject: [Patch] Signdness issue in drivers/scsi/osst.c

Hi,

another signdness warning from gcc 4.1

drivers/scsi/osst.c:5154: warning: comparison of unsigned expression < 0 is always false

The problem is that blk is defined as unsigned, but all usages of it
are normal int cases. osst_get_frame_position() and osst_get_sector()
return ints and can return negative values. If blk stays an unsigned int,
the error check is useless.

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

--- linux-2.6.18-rc4/drivers/scsi/osst.c.orig	2006-08-19 21:16:48.000000000 +0200
+++ linux-2.6.18-rc4/drivers/scsi/osst.c	2006-08-19 21:16:56.000000000 +0200
@@ -4843,8 +4843,7 @@ static int os_scsi_tape_close(struct ino
 static int osst_ioctl(struct inode * inode,struct file * file,
 	 unsigned int cmd_in, unsigned long arg)
 {
-	int		      i, cmd_nr, cmd_type, retval = 0;
-	unsigned int	      blk;
+	int		      i, cmd_nr, cmd_type, blk, retval = 0;
 	struct st_modedef   * STm;
 	struct st_partstat  * STps;
 	struct osst_request * SRpnt = NULL;


-
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