afsmonitor: Fix multiple NUM_CM_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:24:21 +0000 (16:24 -0800)
commit3beca62928665868294ec3e9d34ab63b41e12645
tree58ade8e256424a7818967aa9253e00529fc2f701
parent4ea1c8440aad6bb6dc9cdb598b5708c685603219
afsmonitor: Fix multiple NUM_CM_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_CM_STAT_ENTRIES constant.

Caught by coverity (#985571, #985573)

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