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

Parenthesize 2 * MaxEntries to prevent naive errors #1856

Merged

Conversation

dtikhonov
Copy link
Member

Transcribing

  LargestReference mod 2*MaxEntries + 1

to C one of its offspring without parentheses around 2 * MaxEntries
will produce an incorrect result.

Dmitri Tikhonov added 2 commits October 12, 2018 15:08
Transcribing

  LargestReference mod 2*MaxEntries + 1

to C one of its offspring without parentheses around 2 * MaxEntries
will produce an incorrect result.
@@ -718,15 +718,15 @@ safe to process the rest of the block. If Largest Reference is greater than
zero, the encoder transforms it as follows before encoding:

~~~
LargestReference = LargestReference mod 2*MaxEntries + 1
LargestReference = LargestReference mod (2*MaxEntries) + 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean LR % ((2*ME)+1) or (LR % (2*ME))+1? I think the latter, but I think that it's probably best to double-down on the parentheses here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean the latter. I can add more parentheses.

@afrind afrind merged commit d64ec49 into quicwg:master Oct 23, 2018
@martinthomson martinthomson added editorial An issue that does not affect the design of the protocol; does not require consensus. -qpack labels Dec 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-qpack editorial An issue that does not affect the design of the protocol; does not require consensus.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants