[PATCH 04/19] ib700wdt: Fix off by one

From: Alan Cox
Date: Sun Oct 05 2008 - 12:38:13 EST


This driver can end up accessing one byte out. Found by Zvonimir Rakamaric

Signed-off-by: Alan Cox <alan@xxxxxxxxxx>


Fixes bug #11399
---

drivers/watchdog/ib700wdt.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/watchdog/ib700wdt.c b/drivers/watchdog/ib700wdt.c
index 05a2810..d48a704 100644
--- a/drivers/watchdog/ib700wdt.c
+++ b/drivers/watchdog/ib700wdt.c
@@ -150,7 +150,7 @@ static int ibwdt_set_heartbeat(int t)
{
int i;

- if ((t < 0) || (t > 30))
+ if ((t < 0) || (t >= 30))
return -EINVAL;

for (i = 0x0F; i > -1; i--)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/