-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Maybe I am missing something #77
Comments
This was found given this version of the fuzztests code |
Is there a difference between those two byte lists? They look at a glance to be the same, which is what I'd expect. |
They should be same, but they are not.
|
Thanks, that's easier to see. So the input difference starts with I don't think we guarantee that we preserve the bytes exactly in a situation like that, so I'm going to close this as a non-bug. |
Ok excellent, I thought I was missing something. |
I'm not sure what there is to "defend" against. There are multiple ways of encoding the same thing in protocol buffers; this is just one of them. |
I know, but if I can sniff out those cases I can test the other cases where it should be the same better.
The next thing is to check that all varints are efficiently encoded. |
There's too many equivalent-but-different encodings. I think you're tilting at windmills. For instance, tag order in a message is arbitrary. Map entries can be random (and key/value can be in any order inside that). Extensions obscure stuff too. There's probably others. |
I might be, but I am only checking the length so all the order cases are not checked, since that would be basically impossible. |
Given this message
Yes with no fields, so everything is XXX_unrecognized
Hopefully the comments help.
Given this input
the message becomes
Is this working as expected?
The text was updated successfully, but these errors were encountered: