public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] radio-bcm2048.c: fix wrong overflow check
  2014-04-22  9:47         ` Pali Rohár
@ 2014-04-22 12:39 Pavel Machek
       [not found] ` <20140422083917.GS4963@mwanda>
  0 siblings, 1 reply; 11+ messages in thread
From: Pavel Machek @ 2014-04-22 12:39 UTC (permalink / raw)
  To: hans.verkuil, m.chehab, ext-eero.nurkkala, nils.faerber,
	joni.lapilainen, freemangordon, sre, pali.rohar, Greg KH, trivial,
	linux-media
  Cc: kernel list

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

This patch fixes an off by one check in bcm2048_set_region().

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.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);

-- 

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-05-11 21:06 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-22 12:39 [PATCH v2] radio-bcm2048.c: fix wrong overflow check Pavel Machek
     [not found] ` <20140422083917.GS4963@mwanda>
     [not found]   ` <201404221055.54799@pali>
     [not found]     ` <20140422091656.GV4963@mwanda>
2014-04-22  9:38       ` [PATCH] " Pavel Machek
2014-04-22  9:47         ` Pali Rohár
2014-04-22 12:57           ` [PATCH v2] " Dan Carpenter
2014-04-22 15:02             ` [PATCH v3] [media] radio-bcm2048: " Dan Carpenter
2014-05-05 13:34             ` [PATCH v2] radio-bcm2048.c: " Jiri Kosina
2014-05-09 16:10               ` Pali Rohár
2014-05-09 17:13                 ` Hans Verkuil
2014-05-11 21:06                 ` Jiri Kosina
2014-04-22 13:02         ` [PATCH] " Dan Carpenter
2014-04-22 16:41         ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox