Skip to content

v2.8.1

  • v2.8.1
  • f8364c2
  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
  • Choose a tag to compare

  • v2.8.1
  • f8364c2
  • Choose a tag to compare

  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@daboyuka daboyuka tagged this 22 Apr 03:23
* Add unit tests to demonstrate two unsafe bugs

* Fix bug in embedded pointer nil-check in encoder/decoder

Both encoder and decoder examine the wrong variable when checking for nil
embedded pointer in a struct.

* Fix wrong-size allocation of embedded pointer structs in decoder

When a nil embedded pointer is encountered in the decoder, it attempts to
allocate a fresh struct on the heap and assign its address into the embedded
pointer, so nested decoding can continue. However, it mistakenly allocates a
pointer-sized memory block, rather than struct-sized.
Assets 2
Loading