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.
2fc4c35f9d146e5bb223db3011e20f487b96f3dd
There's a discussion in the C and C++ communities whether you're allowed to use the values of pointers that have been deallocated, if you don't dereference them. Some argue that it is Undefined Behaviour in spite of the numeric value stored in the variable not having changed. Instead of arguing, let's just make sure we don't use the pointers after they have become dangling. We only needed the offset of how far we've written into the buffer to restore the state and we have a function that returns exactly that. Seen while debugging #259. Drive-by keep the `buffersize` global variable unchanged until after `realloc()` has returned with success. Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
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/
Languages
C
50.3%
C++
45.9%
CMake
2.1%
Perl
1.3%
Shell
0.3%
Other
0.1%