CRYPTO_memdup

Duplicate siz bytes from str using the OpenSSL allocator.

Synopsis

Declared in <openssl/crypto.h>

void*
CRYPTO_memdup(
    void const* str,
    size_t siz,
    char const* file,
    int line);

Return Value

Newly allocated copy, or NULL on failure.

Parameters

NameDescription
strSource memory to copy.
sizNumber of bytes to duplicate.
fileSource file name recorded with the allocation (usually FILE).
lineSource line recorded with the allocation (usually LINE).