Skip to content
Commit 7c2500f1 authored by Wim Van Sebroeck's avatar Wim Van Sebroeck
Browse files

[WATCHDOG] ib700wdt.c - fix buffer_underflow bug



This fixes Bug 11399:
if ibwdt_set_heartbeat(int t) is called with value 30 then
the check "if ((t < 0) || (t > 30))" in ibwdt_set_heartbeat
is not going to fail because t == 30, but in the loop, the
check wd_times[i] > t is never going to be true because
none of the wd_times are greater than the value of t (i.e. 30).
So we are exiting the loop with i == -1 and therefore setting
wd_margin to -1 which is wrong.

Reported-by: default avatarZvonimir Rakamaric <zrakamar@cs.ubc.ca>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent 278429cf
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment