Skip to content
Snippets Groups Projects
  1. Mar 05, 2017
  2. Mar 02, 2017
  3. Feb 26, 2017
  4. Feb 25, 2017
  5. Feb 24, 2017
  6. Feb 22, 2017
  7. Feb 20, 2017
  8. Feb 13, 2017
  9. Feb 12, 2017
  10. Jan 21, 2017
  11. Jan 20, 2017
  12. Jan 18, 2017
  13. Jan 17, 2017
  14. Jan 12, 2017
  15. 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
  16. Dec 23, 2016
  17. Dec 22, 2016
Loading