berezovskyi/protobuf-embedded-c

Contents of unknown fields should be skipped

Opened this issue · 2 comments

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

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

  • Changed state: Accepted
  • Added labels: Milestone-1.0M4, Priority-High
  • Removed labels: Priority-Medium

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

  • Added labels: Milestone-1.0M5
  • Removed labels: Milestone-1.0M4