diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2012-10-10 17:56:42 +0900 |
---|---|---|
committer | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2012-10-11 14:24:07 +0900 |
commit | 70bcae855fc2fd6cdded0ee9c650aebcd6379515 (patch) | |
tree | 59d1d513ce44a464ff2e828ebd7b639c647944a1 /ninfod | |
parent | e1dfb3e3bd8926fc069b9c09a79af43ebde547dd (diff) | |
download | iputils-70bcae855fc2fd6cdded0ee9c650aebcd6379515.tar.gz |
ninfod: Fix off-by-one error to check possible programming error.
This bug is not fatal at all because this check is only for
possible programming error (which is not the case so far).
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'ninfod')
-rw-r--r-- | ninfod/ninfod_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ninfod/ninfod_core.c b/ninfod/ninfod_core.c index 6639a7f..c9f34c5 100644 --- a/ninfod/ninfod_core.c +++ b/ninfod/ninfod_core.c @@ -316,7 +316,8 @@ void init_nodeinfo_suptypes(INIT_ARGS) qtype = qtypeinfo_table[i].qtype; w = qtype>>5; b = qtype&0x1f; - if (w > sizeof(suptypes)/sizeof(suptypes[0])) { + if (w >= sizeof(suptypes)/sizeof(suptypes[0])) { + /* This is programming error. */ DEBUG(LOG_ERR, "Warning: Too Large Supported Types\n"); exit(1); } |