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]
Message-ID: <20061218034619.GW10316@stusta.de>
Date:	Mon, 18 Dec 2006 04:46:19 +0100
From:	Adrian Bunk <bunk@...sta.de>
To:	Jonathan Corbet <corbet-v4l@....net>
Cc:	mchehab@...radead.org, v4l-dvb-maintainer@...uxtv.org,
	linux-kernel@...r.kernel.org
Subject: [2.6 patch] drivers/media/video/cafe_ccic.c: fix NULL dereference

We shouldn't dereference "cam" when we already know it's NULL.

Spotted by the Coverity checker.

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

--- linux-2.6.20-rc1-mm1/drivers/media/video/cafe_ccic.c.old	2006-12-18 01:14:24.000000000 +0100
+++ linux-2.6.20-rc1-mm1/drivers/media/video/cafe_ccic.c	2006-12-18 01:21:29.000000000 +0100
@@ -2166,7 +2166,7 @@ static void cafe_pci_remove(struct pci_d
 	struct cafe_camera *cam = cafe_find_by_pdev(pdev);
 
 	if (cam == NULL) {
-		cam_warn(cam, "pci_remove on unknown pdev %p\n", pdev);
+		printk(KERN_WARNING "pci_remove on unknown pdev %p\n", pdev);
 		return;
 	}
 	mutex_lock(&cam->s_mutex);

-
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