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, 14 Aug 2007 23:22:44 +0200
From:	Adrian Bunk <bunk@...nel.org>
To:	netdev@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org
Subject: [2.6 patch] net/8021q/vlanproc.c: fix check-after-use

The Coverity checker spotted that we'd have already oops'ed if "vlandev"
was NULL.

Signed-off-by: Adrian Bunk <bunk@...nel.org>

---
--- linux-2.6.23-rc1-mm2/net/8021q/vlanproc.c.old	2007-08-08 06:22:40.000000000 +0200
+++ linux-2.6.23-rc1-mm2/net/8021q/vlanproc.c	2007-08-08 06:23:13.000000000 +0200
@@ -314,17 +314,17 @@
 static int vlandev_seq_show(struct seq_file *seq, void *offset)
 {
 	struct net_device *vlandev = (struct net_device *) seq->private;
 	const struct vlan_dev_info *dev_info = VLAN_DEV_INFO(vlandev);
 	struct net_device_stats *stats;
 	static const char fmt[] = "%30s %12lu\n";
 	int i;
 
-	if ((vlandev == NULL) || (!(vlandev->priv_flags & IFF_802_1Q_VLAN)))
+	if (!(vlandev->priv_flags & IFF_802_1Q_VLAN))
 		return 0;
 
 	seq_printf(seq, "%s  VID: %d	 REORDER_HDR: %i  dev->priv_flags: %hx\n",
 		       vlandev->name, dev_info->vlan_id,
 		       (int)(dev_info->flags & 1), vlandev->priv_flags);
 
 
 	stats = vlan_dev_get_stats(vlandev);

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ