afsmonitor: Fix multiple NUM_FS_STAT_ENTRIES overflows
authorSimon Wilkinson <sxw@your-file-system.com>
Thu, 28 Feb 2013 17:14:20 +0000 (17:14 +0000)
committerJeffrey Altman <jaltman@your-file-system.com>
Fri, 1 Mar 2013 00:23:47 +0000 (16:23 -0800)
commit4ea1c8440aad6bb6dc9cdb598b5708c685603219
treef7fb5a829795d8edaacf0d5a548a0bfc7732e1cd
parent74d0d0d5e686d82e18f896889870af666c4d495d
afsmonitor: Fix multiple NUM_FS_STAT_ENTRIES overflows

If an array is n elements long, accessing element array[n] is an
overflow. Fix various places where we apply loop bounds incorrectly
using the NUM_FS_STAT_ENTRIES constant.

Caught by coverity (#985570, #985571, #985572)

Change-Id: I8a28f06059771f91415ebc989714929cfd09f296
Reviewed-on: http://gerrit.openafs.org/9315
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/afsmonitor/afsmonitor.c