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: <20140422195206.GA32663@amd.pavel.ucw.cz>
Date:	Tue, 22 Apr 2014 21:52:06 +0200
From:	Pavel Machek <pavel@....cz>
To:	pavel@....cz, 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,
	linux-kernel@...r.kernel.org, linux-media@...r.kernel.org
Subject: [PATCHv2] radio-bcm2048.c: fix wrong overflow check

From: Pali Rohár <pali.rohar@...il.com>

Fix wrong overflow check in radio-bcm2048.

Signed-off-by: Pali Rohár <pali.rohar@...il.com>
Signed-off-by: Pavel Machek <pavel@....cz>
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
---

Nothing in patch changed, just added CCs, and From/Reported-by headers.

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