lkml.org 
[lkml]   [2008]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 04/19] ib700wdt: Fix off by one
Date
This driver can end up accessing one byte out. Found by Zvonimir Rakamaric

Signed-off-by: Alan Cox <alan@redhat.com>


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--)


\
 
 \ /
  Last update: 2008-10-05 18:41    [W:0.151 / U:0.108 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site