Up to [cvs.NetBSD.org] / pkgsrc / devel / libcbor
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
libcbor: update to 0.15.0. Minor release with several breaking changes, marked BREAKING and ABI BREAKING below: read them before upgrading. Binaries must be rebuilt against the new headers, since cbor_incref and cbor_decref are no longer exported. Also includes the cbor_stream_decode security fixes released in 0.14.1.
libcbor: update to 0.14.0. 0.14.0 (2026-04-07) --------------------- - [Fix NULL dereference in `cbor_move`, `cbor_serialized_size`, and `cbor_serialize_tag` when a tag has no item set] - [Document large-allocation risk in `cbor_load` and clarify test-only CMake flags] - [Fix NULL dereference in `cbor_copy`/`cbor_copy_definite` on allocation failure] - [Explicitly guard against `size * 2` overflow in `cbor_builder_map_start_callback`] - [Only generate CMake coverage build targets when explicitly enabled] - [Fix CMake feature macro names and ensure `_CBOR_NODISCARD` is defined with `[[nodiscard]]`] - [Fix integer overflow in `cbor_copy_definite()` when accumulating indefinite bytestring/string chunk lengths] - [Add bounds check in `cbor_array_get()` to return NULL on out-of-bounds access] - BREAKING: [`cbor_tag_set_item` now releases the reference to the previous tagged item] - Previously, replacing the tagged item would leak the old item's reference. If you were manually releasing the old item before calling `cbor_tag_set_item`, you should remove the extra `cbor_decref`. - Potentially BREAKING: [`cbor_tag_item` now returns NULL if the tag has no item set] - Previously, this would be undefined behavior (NULL pointer dereference), so no valid clients should be affected. - Potentially BUILD BREAKING: [CPack Debian package architecture is now detected via `dpkg` instead of being hardcoded to `amd64`] - BUILD BREAKING: [Remove deprecated `CBOR_CUSTOM_ALLOC` CMake option] - The option has been a no-op since 0.10.0. If your build passes `-DCBOR_CUSTOM_ALLOC=ON`, remove it. - [Modernize CMake build: use `project(VERSION ...)`, replace `add_definitions()` with target-scoped `target_compile_definitions()`, remove redundant `include_directories()`] - [Replace global `CMAKE_C_FLAGS` mutations with target-scoped `target_compile_options()` via an INTERFACE library, and simplify LTO configuration] - [Fix Windows CI: propagate `_CRT_SECURE_NO_WARNINGS` to examples/tests, restrict LTO to Release builds, parallelize Windows CI build] - [Add `cbor_map_get` for key-based map lookup with a caller-supplied equality function] - Signature: `cbor_map_get(map, key, eq)` — pass any equality predicate, e.g. `cbor_structurally_equal` - Parameterised equality allows type-specific comparators or custom data-model semantics without library changes - See also: #96 - [Add `cbor_structurally_equal` for encoding-level item comparison] - Compares two items structurally: encoding width, definite-vs-indefinite length, chunk boundaries, and map entry order all count - Runs in O(n) time in the encoded byte size with no additional allocations - See also: #96 - BREAKING: [Fix NaN encoding in `cbor_encode_half` to preserve sign and payload bits] - Previously, all NaN values were encoded as `0x7E00` (positive quiet NaN, zero payload). Now the sign bit and the top 10 mantissa bits are preserved in the half-precision encoding. - `_cbor_decode_half` now reconstructs the NaN bit pattern faithfully, enabling encode/decode round-trips. Previously it always returned the C `NAN` constant. - Very small normal floats that previously rounded to `+0` now round to `±0` depending on their sign. - Clients that relied on all NaNs normalising to `0x7E00` will see different output. See #215.
libcbor: update to 0.13.0. 0.13.0 (2025-08-30) --------------------- - [Fix `cbor_is_null`, `cbor_is_undef`, `cbor_is_bool` assertion failing on non-ctrl floats in debug mode] - [Add an example for handling of CBOR Sequences] - [Use C23/c2x if available] - libcbor remains C99 compatible - When the compiler does not support new standard, C99 will be used, so the change should be backwards compatible - [Improved introduction documentation and examples] - [Add cbor_copy_definite to turn indefinite items into definite equivalents] - BUILD BREAKING: [Minimum CMake version set to 3.5] - See <https://repology.org/project/cmake/versions> for support; the vast majority of users should not be affected.
libcbor: use upstream patch for cmake 4
libcbor: fix build with cmake 4
libcbor: updated to 0.12.0 0.12.0 (2025-03-16) - BUILD BREAKING: [Respect `INTERPROCEDURAL_OPTIMIZATION` and use the default value](https://github.com/PJK/libcbor/issues/315) - BREAKING: Changes to NaN encoding - [Fix NaN encoding on Windows](https://github.com/PJK/libcbor/issues/271) - [Fix NaN encoding on mips/mipsel](https://github.com/PJK/libcbor/issues/329) - [Signaling NaNs will from now on be encoded as canonical quiet NaNs](https://github.com/PJK/libcbor/pull/335). This was already the existing behavior for half-precision floats - Decoding is unchanged - Please note that this is an intermediate state and likely to be revisited (https://github.com/PJK/libcbor/issues/336) - [Make build compatible with CMake FetchContent](https://github.com/PJK/libcbor/pull/341) (by [Jan200101](https://github.com/Jan200101)) - [Support Bzlmod for Bazel builds](https://github.com/PJK/libcbor/pull/340) - This should significantly simplify including libcbor as a dependency/module in Bazel projects, see https://bazel.build/external/migration - Code quality improvements - [Fix compiler pragmas](https://github.com/PJK/libcbor/pull/347) (by [brooksdavis](https://github.com/brooksdavis)) - [Fix code style issues](https://github.com/PJK/libcbor/pull/321) - [Fixed bug in cbor2cjson example](https://github.com/PJK/libcbor/pull/338)
*: replace CMAKE_ARGS with CMAKE_CONFIGURE_ARGS
libcbor: oops, didn't mean to leave in a PKGREVISION bump.
libcbor: fix PLIST (and hopefully stay fixed on next update).
libcbor: updated to 0.11.0 0.11.0 (2024-02-04) --------------------- - [Updated documentation to refer to RFC 8949](https://github.com/PJK/libcbor/issues/269) - Improvements to `cbor_describe` - [Bytestring data will now be printed as well](https://github.com/PJK/libcbor/pull/281) by [akallabeth](https://github.com/akallabeth) - [Formatting consistency and clarity improvements](https://github.com/PJK/libcbor/pull/285) - [Fix `cbor_string_set_handle` not setting the codepoint count](https://github.com/PJK/libcbor/pull/286) - BREAKING: [`cbor_load` will no longer fail on input strings that are well-formed but not valid UTF-8](https://github.com/PJK/libcbor/pull/286) - If you were relying on the validation, please check the result using `cbor_string_codepoint_count` instead - BREAKING: [All decoders like `cbor_load` and `cbor_stream_decode` will accept all well-formed tag values](https://github.com/PJK/libcbor/pull/308) (bug discovered by [dskern-github](https://github.com/dskern-github)) - Previously, decoding of certain values would fail with `CBOR_ERR_MALFORMATED` or `CBOR_DECODER_ERROR` - This also makes decoding symmetrical with serialization, which already accepts all values
libcbor: updated to 0.10.2 0.10.2 (2023-01-31) Fixed minor test bug causing failures for x86 Linux (discovered by trofi) Actual libcbor functionality not affected, bug was in the test suite Made tests platform-independent 0.10.1 (2022-12-30) Fix a regression in cbor_serialize_alloc that caused serialization of zero-length strings and bytestrings or byte/strings with zero-length chunks to fail (discovered by martelletto) 0.10.0 (2022-12-29) Make the buffer_size optional in cbor_serialize_alloc BREAKING: Improved half-float encoding for denormalized numbers. Denormalized half-floats will now preserve data in the mantissa Note: Half-float NaNs still lose data BUILD BREAKING: Minimum CMake version is 3.0 See https://repology.org/project/cmake/versions for support; the vast majority of users should not be affected. Fix a potential memory leak when the allocator fails during array or map decoding Fix a memory leak when the allocator fails when adding chunks to indefinite bytestrings. (discovered by James-ZHANG) Fix a memory leak when the allocator fails when adding chunks to indefinite strings Potentially BUILD BREAKING: Add nodiscard attributes to most functions Warning: This may cause new build warnings and (in rare cases, depending on your configuration) errors BREAKING: Fix cbor_copy leaking memory and creating invalid items when the allocator fails. Previously, the failures were not handled in the interface. Now, cbor_copy may return NULL upon failure; clients should check the return value Fix cbor_build_tag illegal memory behavior when the allocator fails Add a new cbor_serialized_size API Reworked cbor_serialize_alloc to allocate the exact amount of memory necessary upfront This should significantly speed up cbor_serialize_alloc for large items by avoiding multiple reallocation iterations Clients should not use the return value of cbor_serialize_alloc. It may be removed in the future. BUILD BREAKING: Deprecate CBOR_CUSTOM_ALLOC cbor_set_allocs will always be enabled from now on Note: The flag will be kept as a no-op triggering a warning when used for one version and then removed completely
libcbor: do not build examples
*: remove pkg-config from tools where no buildlink3.mk file is included Bulk build on NetBSD of these packages had the same result as before (build succeeds, no PLIST change).
libcbor: update to 0.9.0 Improved pkg-config paths handling Use explicit math.h linkage Fixed handling of items that exceed the host size_t range
devel/libcbor: ldexp requires -lm. This mechanism is a kludge -- I would like to just say LIBS+= -lm but that doesn't work with cmake. Feel free to replace this by a better mechanism for cmake!
libcbor: update to 0.8.0
This is an ABI breaking update so security/libfido2 must also be updated.
v0.8.0
BREAKING: Fix cbor_tag_item not increasing the reference count on the tagged item reference it returns [Fixes #109] (discovered bt JohnGilmour)
BREAKING: CBOR_DECODER_EBUFFER removed from cbor_decoder_status
Fixed several minor manpage issues [#159] (discovered by kloczek@)
v0.7.0
Fix bad encoding of NaN half-floats [Fixes #53] (discovered by BSipos-RKF)
Fix potentially bad encoding of negative half-float with exponent < -14 [Fixes #112] (discovered by yami36)
BREAKING: Improved bool support [Fixes #63]
Fix memory_allocation_test breaking the build without CBOR_CUSTOM_ALLOC [Fixes #128] (by panlinux)
Fix a potential build issue where cJSON includes may be misconfigured
Breaking: Add a limit on the size of the decoding context stack (by James-ZHANG)
Enable LTO/IPO based on CheckIPOSupported [#143] (by xanderlent)
v0.6.1
Fix bad shared library version number
v0.6.0
Correctly set .so version [Fixes #52].
Fix & prevent heap overflow error in example code [#74] [#76] (by @nevun)
Correctly set OSX dynamic library version [Fixes #75]
Fix misplaced 0xFF bytes in maps possibly causing memory corruption
BREAKING: Fix handling & cleanup of failed memory allocation in constructor
and builder helper functions [Fixes #84]
Globally enforced code style [Fixes #83]
Fix issue possible memory corruption bug on repeated
cbor_(byte)string_add_chunk calls with intermittently failing realloc calls
Fix possibly misaligned reads and writes when endian.h is uses or when
running on a big-endian machine [Fixes #99, #100]
devel: align variable assignments pkglint -Wall -F --only aligned --only indent -r No manual corrections.
Add libcbor version 0.5.0 to the packages collection libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format. From cbor.io: RFC 7049 Concise Binary Object Representation "The Concise Binary Object Representation (CBOR) is a data format whose design goals include the possibility of extremely small code size, fairly small message size, and extensibility without the need for version negotiation."