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:	Sun, 20 Apr 2014 16:56:22 +0200
From:	Pavel Machek <pavel@....cz>
To:	hans.verkuil@...co.com, m.chehab@...sung.com,
	ext-eero.nurkkala@...ia.com, nils.faerber@...nelconcepts.de,
	joni.lapilainen@...il.com, freemangordon@....bg, sre@...g0.de,
	dan.carpenter@...cle.com, pali.rohar@...il.com,
	Greg KH <greg@...ah.com>, trivial@...nel.org
Cc:	kernel list <linux-kernel@...r.kernel.org>
Subject: [PATCH] radio-bcm2048.c: fix wrong overflow check


Fix wrong overflow check in radio-bcm2048.

Signed-off-by: Pali Rohár <pali.rohar@...il.com>
Signed-off-by: Pavel Machek <pavel@....cz>


diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c
index b2cd3a8..bbf236e 100644
--- a/drivers/staging/media/bcm2048/radio-bcm2048.c
+++ b/drivers/staging/media/bcm2048/radio-bcm2048.c
@@ -737,7 +737,7 @@ static int bcm2048_set_region(struct bcm2048_device *bdev, u8 region)
 	int err;
 	u32 new_frequency = 0;
 
-	if (region > ARRAY_SIZE(region_configs))
+	if (region >= ARRAY_SIZE(region_configs))
 		return -EINVAL;
 
 	mutex_lock(&bdev->mutex);

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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