Repository navigation
Patch release, ABI-compatible with 0.15.0. Fixes GHSA-395p-m7q2-jqh7, a use-after-free when a replacement aliases the replaced item.
- Fix
cbor_encode_halfrounding of values too small for half precision (by sage-mode-hunter)- Subnormal singles now encode as signed zero instead of unrelated non-zero values, and values in [2^-25, 2^-24) round to 2^-24 instead of zero
- Fix use-after-free in
cbor_array_replace,cbor_array_set, andcbor_tag_set_itemwhen the new value is, or is owned by, the item being replaced (reported by mzfr) - Fix NULL dereference in
cbor_copy,cbor_copy_definite, andcbor_describewhen a tag has no item set (based on #476 by mzfr) - Fix
cbor_string_codepoint_countreturning 0 for valid indefinite strings (based on #476 by mzfr)- It now returns the sum of the chunks' codepoint counts, or 0 if any chunk is not valid UTF-8
- Assert in Debug builds that
cbor_string_length,cbor_string_handle,cbor_bytestring_length, andcbor_bytestring_handleare given definite items, as documented