mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 05:27:44 +00:00
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) 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> (cherry picked from commit 6a54bf735871d93bc77e5cf166e506f4f2423d0a) Change-Id: I056432a1bf85b175ee4fc307d0662d072724b272 Reviewed-on: http://gerrit.openafs.org/11034 Reviewed-by: Andrew Deason <adeason@sinenomine.net> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil> Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
This commit is contained in:
parent
b76b80bb08
commit
82f66b96fa
@ -539,7 +539,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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user