This repository has been archived on 2026-09-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Thiago Macieira c0aad2fb21 cborparser_dup_string: don't modify *buffer until success
We were returning from the function with the memory we had allocated and
freed, if the second iteration over the string produced a failure that
didn't happen on the first one. This can't happen with pure memory
buffers, but can happen with an external data source that fails to
produce the same contents twice.

I'm documenting that the values in all error conditions except for OOM
are undefined, so one mustn't attempt to use them, even to free. This
does not change behaviour of the library, just documents.

But this commit does make it clear the OOM condition will return a valid
`*buflen` and `next`, the latter of which is new behaviour with this
commit.

Fixes #258.

Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
2025-03-11 18:32:15 -07:00
2016-08-04 14:25:32 -07:00
2018-02-07 10:40:52 -08:00
2017-07-26 10:29:17 -07:00
2024-05-01 18:29:45 -07:00
2017-12-06 18:25:51 -08:00
2021-09-03 11:56:36 -07:00

Concise Binary Object Representation (CBOR) Library
---------------------------------------------------

To build TinyCBOR:

  make

If you want to change the compiler or pass extra compiler flags:

  make CC=clang CFLAGS="-m32 -Oz" LDFLAGS="-m32"

Documentation: https://intel.github.io/tinycbor/current/

S
Description
[ARCHIVE] GOLEM lab historic — frozen 2026-09-06
Readme MIT
891 KiB
Languages
C 50.3%
C++ 45.9%
CMake 2.1%
Perl 1.3%
Shell 0.3%
Other 0.1%