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

Contents of unknown fields should be skipped #27

Open
GoogleCodeExporter opened this issue Jul 7, 2015 · 2 comments
Open

Contents of unknown fields should be skipped #27

GoogleCodeExporter opened this issue Jul 7, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

One of the important features of Protocol Buffers is the ability to extend 
messages later without breaking compatibility. This requires the decoder to be 
able to skip any unknown fields.

Currently protobuf-embedded-c does skip unknown tags, but does not skip the 
contents of those unknown fields. This causes the contents to be parsed as 
data, which will cause all sorts of crashes.

I suggest adding a default case in the big switch(tag), and use the wire type 
to skip the field contents there.

(This problem is not so important to me personally, I just ran into it when 
benchmarking nanopb vs. protobuf-embedded-c and thought I would report it.)

Original issue reported on code.google.com by Petteri.Aimonen on 3 Feb 2013 at 4:19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant