Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect limit check in CFE_ES_GenPoolValidateState #1270

Closed
jphickey opened this issue Mar 29, 2021 · 1 comment · Fixed by #1271 or #1258
Closed

Incorrect limit check in CFE_ES_GenPoolValidateState #1270

jphickey opened this issue Mar 29, 2021 · 1 comment · Fixed by #1271 or #1258
Assignees
Labels
Milestone

Comments

@jphickey
Copy link
Contributor

Describe the bug
A check for the "NumBuckets" member should be <= but it is using <.

To Reproduce
Attempt to validate PoolID 1 which uses the max number of buckets. Function returns false, but record is valid.

Expected behavior
CFE_ES_GenPoolValidateState() should return true if using the max number of buckets (17 by default).

Code snips
One-liner here:

PoolRecPtr->NumBuckets > 0 && PoolRecPtr->NumBuckets < CFE_PLATFORM_ES_POOL_MAX_BUCKETS);

System observed on:
Ubuntu 20.04

Reporter Info
Joseph Hickey, Vantage Systems, Inc.

@jphickey jphickey self-assigned this Mar 29, 2021
@jphickey jphickey added the bug label Mar 29, 2021
jphickey added a commit to jphickey/cFE that referenced this issue Mar 29, 2021
It is OK/valid if NumBuckets is the maximum value
@skliper
Copy link
Contributor

skliper commented Mar 30, 2021

Should a unit test be added to confirm this case works?

@skliper skliper added this to the 7.0.0 milestone Mar 30, 2021
astrogeco added a commit that referenced this issue Mar 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants