Coverity started complaining about a bounds overrun... can someone check this patch is ok? Index: heartbeat/heartbeat.c =================================================================== RCS file: /home/cvs/linux-ha/linux-ha/heartbeat/heartbeat.c,v retrieving revision 1.506 diff -u -r1.506 heartbeat.c --- heartbeat/heartbeat.c 26 Apr 2006 03:42:07 -0000 1.506 +++ heartbeat/heartbeat.c 11 May 2006 09:22:43 -0000 @@ -5975,8 +5975,8 @@ longclock_t last_rexmit; size_t len; - if (msgslot < 0) { - msgslot = MAXMSGHIST; + if (msgslot < 0 || msgslot >= MAXMSGHIST) { + msgslot = MAXMSGHIST-1; } if (hist->msgq[msgslot] == NULL) { continue; -- Andrew Beekhof "Eating fruit is mean and vicious... keep your hands off Golden Delicious" - TISM |
_______________________________________________________ Linux-HA-Dev: [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/
