MBEDTLS_SSL_CHK_BUF_PTR macro
This macro checks if the remaining size in a buffer is greater or equal than a needed space. If it is not the case, it returns an SSL_BUFFER_TOO_SMALL error.
Arguments
cur
Pointer to the current position in the buffer.
end
Pointer to one past the end of the buffer.
need
Needed space in bytes.