26 if (a <= 1 || b <= 1)
return true;
33 return sum >= a && sum >= b;
37 if (a == 0 || b == 0)
return 0;
_cbor_malloc_t _cbor_malloc
_cbor_realloc_t _cbor_realloc
bool _cbor_safe_to_add(size_t a, size_t b)
Can a and b be added without overflowing size_t?
size_t _cbor_safe_signaling_add(size_t a, size_t b)
Adds a and b, propagating zeros and returning 0 on overflow.
void * _cbor_realloc_multiple(void *pointer, size_t item_size, size_t item_count)
Overflow-proof contiguous array reallocation.
void * _cbor_alloc_multiple(size_t item_size, size_t item_count)
Overflow-proof contiguous array allocation.
size_t _cbor_highest_bit(size_t number)
Highest on bit position.
bool _cbor_safe_to_multiply(size_t a, size_t b)
Can a and b be multiplied without overflowing size_t?