cells has a maximum size of MAXCELLS. Doing cells[MAXCELLS] overflows
that array. Clamp our maximum number of cells at one below this to
avoid the overflow.
Caught by coverity (#98551)
Change-Id: I45fd8a55e31ad7ea86a996b593359536c7078891
Reviewed-on: http://gerrit.openafs.org/9324
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
if (as->parms[0].items) { /* A cell is provided */
for (itp = as->parms[0].items; itp; itp = itp->next) {
- if (i > MAXCELLS) {
+ if (i >= MAXCELLS) {
printf
("The maximum number of cells (%d) is exceeded; the rest are ignored\n",
MAXCELLS);