-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Tag testing in QRCodeSetupPayloadParser is wrong #10188
Labels
spec
Mismatch between spec and implementation
Comments
bzbarsky-apple
added a commit
to bzbarsky-apple/connectedhomeip
that referenced
this issue
Dec 22, 2021
The only reason this worked in any way is that TLV::IsProfileTag() tests true for small integers, so the VerifyOrReturnError was a no-op, even though we were testing IsContextTag() and IsProfileTag() on the tag _number_, not the tag. Per spec, only context tags are allowed here, so just allow those. Fixes project-chip#10188
Damian-Nordic
pushed a commit
that referenced
this issue
Dec 22, 2021
The only reason this worked in any way is that TLV::IsProfileTag() tests true for small integers, so the VerifyOrReturnError was a no-op, even though we were testing IsContextTag() and IsProfileTag() on the tag _number_, not the tag. Per spec, only context tags are allowed here, so just allow those. Fixes #10188
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
Code looks like this:
which is nonsense: the tag type tests need to happen on the tag, not the tag number.
But also, why are we allowing profile tags here anyway? The spec doesn't.
Proposed Solution
Align with spec, add tests.
@shana-apple
The text was updated successfully, but these errors were encountered: