]> git.michaelhowe.org Git - packages/o/openafs.git/commit
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)
committerStephan Wiesand <stephan.wiesand@desy.de>
Tue, 3 Jun 2014 16:28:49 +0000 (12:28 -0400)
commite73905634170b2708386bc0697f87dad1614a4be
tree8366bcee21a45538be9bd76908a69a8b09c233cf
parentab2077b4646e612a4d51b0216344c4e63c165c1b
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)

Reviewed-on: http://gerrit.openafs.org/9316
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 3beca62928665868294ec3e9d34ab63b41e12645)

Change-Id: Icb2221409d7cd62a7efa229697eeb16146ad3ddd
Reviewed-on: http://gerrit.openafs.org/11029
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afsmonitor/afsmonitor.c