Skip to content
Snippets Groups Projects
  1. Feb 12, 2017
  2. Dec 31, 2016
    • Petteri Aimonen's avatar
      afdbca39
    • Petteri Aimonen's avatar
      Fix multiple oneofs in same message (issue #229) · 48f5dd83
      Petteri Aimonen authored
      Previously the field iterator logic didn't know whether two
      oneof fields were part of the same union, or separate. This
      caused wrong pointers to be calculated if multiple oneofs were
      inside a single message.
      
      This commit fixes this by using dataoffset of PB_SIZE_MAX to
      indicate union fields after the first field.
      
      Theoretically PB_SIZE_MAX is also a valid value for data offset,
      which could cause errors. Adding a compile-time assert for this
      is somewhat difficult. However I consider it extremely unlikely
      that there is any platform that could trigger this situation, as
      it would require 255 bytes of extra data/padding between two protobuf
      oneof fields. On 64-bit architectures the worst case is 16 bytes,
      and even esoteric platforms only align to 64 bytes or so. Manual
      modification of the generated .pb.h file could trigger this, but
      even then it would require pretty bad luck to happen.
      48f5dd83
    • Petteri Aimonen's avatar
      Add testcase for issue #229 · 90a19bf0
      Petteri Aimonen authored
      90a19bf0
  3. Dec 23, 2016
  4. Dec 22, 2016
  5. Dec 09, 2016
  6. Nov 22, 2016
  7. Nov 21, 2016
  8. Nov 19, 2016
  9. Oct 30, 2016
  10. Oct 24, 2016
  11. Oct 23, 2016
  12. Oct 11, 2016
  13. Oct 10, 2016
  14. Oct 09, 2016
  15. Sep 02, 2016
  16. Aug 10, 2016
  17. Aug 06, 2016
Loading