YungChang / protobuf-embedded-c

Automatically exported from code.google.com/p/protobuf-embedded-c
0 stars 0 forks source link

Contents of unknown fields should be skipped #27

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago

Original comment by wolfgang.schwitzer on 13 Mar 2013 at 11:50

GoogleCodeExporter commented 8 years ago

Original comment by nvp...@gmail.com on 30 May 2013 at 5:31