Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Check of reserved bits in BitMasks #313

Open
erickvermot opened this issue Mar 20, 2017 · 1 comment
Open

Check of reserved bits in BitMasks #313

erickvermot opened this issue Mar 20, 2017 · 1 comment
Labels

Comments

@erickvermot
Copy link
Contributor

erickvermot commented Mar 20, 2017

Reserved bits in BitMasks that are not set to 0 should lead to the message beeing rejected (pg52).
Curently, foundation/base/GenericBitMask is not checking for bits that do not have a _enum item.

Maybe implement it in the MetaBitMask, doing something like

USED_BITS = sum([value for key, value in _enum])
RESERVED_BITS = ~USED_BITS

and before the GenericBitMask parses the bits, check that RESERVED_BITS & bitmask == 0.

@beraldoleal
Copy link
Member

beraldoleal commented Mar 21, 2017

Thanks @erickvermot to report this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants