-
-
Notifications
You must be signed in to change notification settings - Fork 423
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 #994 #995
Fix #994 #995
Conversation
Wow, thanks for looking into this! I'd like to merge this to unblock the ability to benchmark #991, but at the same time I don't yet feel that I understand why the changes in 51685fb broke this scenario; the changes to Before we merge this, would you mind just fixing up the first line of the commit message? Would be nice if that was a bit more descriptive (for example, I would probably write it like "quinn-h3: limit amount of data decoded (fixes #994)"). (Personally I think the other lines can be scrapped, since I feel they don't add much explanatory value beyond the actual code changes.) |
OK, I adjusted the commit message. |
Thanks! |
@djc If I understand it correctly, the previously used buf.take(self.remaining).to_bytes() was already limited to buf.remaining() because of how the take method works. I added the first line to prevent errors if buf was larger than len, but I assume that case does not occur. |
Huh, I guess you're right -- and I was just thrown off by the first part of your change. However, I'm not quite comfortable with saying "that case does not occur", so if it works without that change maybe we could revert that part? |
I'm sorry, I should have clarified that up front. I opened a new PR to revert the first part here: #997. |
Changes
PartialData::decode
to copy at mostlen
bytes.Changes
PartialData::decode_data
to copy at mostbuf.remaining()
bytes.