-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix broken tag handling in QRCodeSetupPayloadParser. #13201
Merged
Damian-Nordic
merged 1 commit into
project-chip:master
from
bzbarsky-apple:fix-QRCode-tag-handling
Dec 22, 2021
Merged
Fix broken tag handling in QRCodeSetupPayloadParser. #13201
Damian-Nordic
merged 1 commit into
project-chip:master
from
bzbarsky-apple:fix-QRCode-tag-handling
Dec 22, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
pullapprove
bot
requested review from
anush-apple,
austinh0,
balducci-apple,
Byungjoo-Lee,
carol-apple,
chrisdecenzo,
chshu,
chulspro,
Damian-Nordic,
dhrishi,
electrocucaracha,
franck-apple,
gjc13,
harimau-qirex,
hawk248,
holbrookt,
jelderton,
jepenven-silabs,
jmartinez-silabs,
kghost,
kpschoedel,
LuDuda,
msandstedt,
mspang,
pan-apple,
robszewczyk,
sagar-apple and
saurabhst
December 22, 2021 05:57
pullapprove
bot
requested review from
selissia,
tcarmelveilleux,
tecimovic,
turon,
vijs,
vivien-apple,
wbschiller,
woody-apple,
xylophone21 and
yufengwangca
December 22, 2021 05:57
saurabhst
approved these changes
Dec 22, 2021
PR #13201: Size comparison from f9ce4be to 065db81 Decreases (1 build for linux)
Full report (31 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
kpschoedel
approved these changes
Dec 22, 2021
Damian-Nordic
approved these changes
Dec 22, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Problem
Tag numbers being treated as tags.
Change overview
Fix that, so we can try to make TLV::Tag not be an integer anymore.
Testing
Not sure how to exercise this code...