Open Enclave  0.13.0

◆ oe_host_strndup()

char* oe_host_strndup ( const char *  str,
size_t  n 
)

Make a heap copy of a string.

This function allocates memory on the host's heap, copies no more than n bytes from the str parameter to that memory, and returns a pointer to the newly allocated memory.

Parameters
[in]strThe string to be copied.
[in]nThe number of characters to be copied.
Returns
A pointer to the newly allocated string or NULL if unable to allocate the storage.