cn-cbor icon indicating copy to clipboard operation
cn-cbor copied to clipboard

A constrained node implementation of CBOR in C

Results 31 cn-cbor issues
Sort by recently updated
recently updated
newest added

@cabo I'm doing some packaging for conan to use this project as dependency of https://github.com/openthread/ot-commissioner now my question: is this still maintained? I've been doing MRs to https://github.com/jimsch/cn-cbor/tree/complete though normally...

When encoding cn_cbor structure before writing any chunk of bytes into buffer, library ensures that there is enough space to write current chunk. It is done by the following inequality:...

Hello, I am looking into this library to use for serialization of data. I have used fuzz testing for testing similar libraries to find bugs. Based on the test case...

``` case AI_2: #ifndef CBOR_NO_FLOAT cb->type = CN_CBOR_DOUBLE; cb->v.dbl = decode_half(val); cb->length = 2; // Tiny Float, especially nice for serializing binary fractions #else /* CBOR_NO_FLOAT */ CN_CBOR_FAIL(CN_CBOR_ERR_FLOAT_NOT_SUPPORTED); #endif /*...

The `cn_cbor_context` struct itself should not be modified by the calls that use the context struct. With this in mind the `cn_cbor_context` struct pointer should be passed as `const` to...

The intention of this line of code is to check whether the conversion to float reduced the precision of the value, hence the conversion to double is correct here, but...

This is partly done, but there are still some thing to be finished. If the system builds a DLL rather than a static library, the symbols to be exported from...

Some switch statements were missing default labels, this change adds [-Wswitch-default](https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wswitch-default) to the GCC+Clang build config and fixes the resulting warnings.

for consistency, both > if (errp->err == CN_CBOR_NO_ERROR) and > if (ret) could be used to determine there was no error during decoding