mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 15:00:12 +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) 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:
parent
6c41b1f740
commit
6a54bf7358
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user