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>] [day] [month] [year] [list]
Date:	Mon, 9 Oct 2006 01:16:32 +0200
From:	Adrian Bunk <bunk@...sta.de>
To:	Paul B Schroeder <pschroeder@...ogix.com>
Cc:	linux-kernel@...r.kernel.org, gregkh@...e.de,
	linux-usb-devel@...ts.sourceforge.net
Subject: [2.6 patch] drivers/usb/serial/mos7840.c: fix a check-after-dereference

This patch fixes an obvious check-after-dereference spotted by the 
Coverity checker.

Signed-off-by: Adrian Bunk <bunk@...sta.de>

--- linux-2.6/drivers/usb/serial/mos7840.c.old	2006-10-09 00:35:49.000000000 +0200
+++ linux-2.6/drivers/usb/serial/mos7840.c	2006-10-09 00:36:28.000000000 +0200
@@ -2412,11 +2412,12 @@
 	}
 
 	mos7840_port = mos7840_get_port_private(port);
-	tty = mos7840_port->port->tty;
 
 	if (mos7840_port == NULL)
 		return -1;
 
+	tty = mos7840_port->port->tty;
+
 	dbg("%s - port %d, cmd = 0x%x", __FUNCTION__, port->number, cmd);
 
 	switch (cmd) {

-
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