lkml.org 
[lkml]   [2006]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[2.6 patch] video/bt8xx/bttv-cards.c: fix off-by-one errors
This patch fixes two off-by-one errors spotted by the Coverity checker.

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

---

drivers/media/video/bt8xx/bttv-cards.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.17-rc1-mm1-full/drivers/media/video/bt8xx/bttv-cards.c.old 2006-04-04 20:27:10.000000000 +0200
+++ linux-2.6.17-rc1-mm1-full/drivers/media/video/bt8xx/bttv-cards.c 2006-04-04 20:28:24.000000000 +0200
@@ -2991,13 +2991,13 @@ void __devinit bttv_idcard(struct bttv *

if (UNSET != audiomux[0]) {
gpiobits = 0;
- for (i = 0; i < 5; i++) {
+ for (i = 0; i < 4; i++) {
bttv_tvcards[btv->c.type].gpiomux[i] = audiomux[i];
gpiobits |= audiomux[i];
}
} else {
gpiobits = audioall;
- for (i = 0; i < 5; i++) {
+ for (i = 0; i < 4; i++) {
bttv_tvcards[btv->c.type].gpiomux[i] = audioall;
}
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-04 21:00    [W:0.061 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site