From 6a54bf735871d93bc77e5cf166e506f4f2423d0a Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Sat, 2 Mar 2013 09:01:59 +0000 Subject: [PATCH] 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 Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- src/vlserver/cnvldb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vlserver/cnvldb.c b/src/vlserver/cnvldb.c index 6fdc56fc42..f31d31cd8d 100644 --- a/src/vlserver/cnvldb.c +++ b/src/vlserver/cnvldb.c @@ -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);