[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140420145622.GA15567@amd.pavel.ucw.cz>
Date: Tue, 22 Apr 2014 15:39:50 +0300
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,
pali.rohar@...il.com, Greg KH <greg@...ah.com>, trivial@...nel.org,
linux-media@...r.kernel.org
Cc: kernel list <linux-kernel@...r.kernel.org>
Subject: [PATCH v2] radio-bcm2048.c: fix wrong overflow check
From: Pali Rohár <pali.rohar@...il.com>
This patch fixes an off by one check in bcm2048_set_region().
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
Signed-off-by: Pali Rohár <pali.rohar@...il.com>
Signed-off-by: Pavel Machek <pavel@....cz>
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
---
v2: Send it to the correct list. Re-work the changelog.
This patch has been floating around for four months but Pavel and Pali
are knuckle-heads and don't know how to use get_maintainer.pl so they
never send it to linux-media.
Also Pali doesn't give reporter credit and Pavel steals authorship
credit.
Also when you try explain to them about how to send patches correctly
they complain that they have been trying but it is too much work so now
I have to do it. During the past four months thousands of other people
have been able to send patches in the correct format to the correct list
but it is too difficult for Pavel and Pali... *sigh*.
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);
--
--
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