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