vlserver: Use correct literal in bounds check

The base array has VL_MAX_ADDREXTBLKS elements. Use this when
checking for an array overflow, rather than VL_ADDREXTBLK_SIZE.

Caught by coverity (#985600)

Change-Id: Ie60ad5cc79c41245028887871759776549694426
Reviewed-on: http://gerrit.openafs.org/9346
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
This commit is contained in:
Simon Wilkinson 2013-03-02 09:01:59 +00:00 committed by Jeffrey Altman
parent 6c41b1f740
commit 6a54bf7358

View File

@ -535,7 +535,7 @@ convert_mhentries(int oldfd, int newfd, struct vlheader_2 *header,
basei = (addr >> 16) & 0xff;
index = addr & 0xffff;
if ((basei >= VL_ADDREXTBLK_SIZE) || !base[basei]) {
if ((basei >= VL_MAX_ADDREXTBLKS) || !base[basei]) {
fprintf(stderr,
"Warning: mh entry %d has no IP address; ignored!!\n",
i);