Duplicate at most s characters of str using the OpenSSL allocator.
Synopsis
Declared in <openssl/crypto.h>
char*
CRYPTO_strndup(
char const* str,
size_t s,
char const* file,
int line);
Return Value
Newly allocated NUL‐terminated copy, or NULL on failure.
Parameters
Name |
Description |
str |
Source bytes (NUL‐terminated or truncated at |
s |
Maximum number of characters to copy (excluding the added NUL). |
file |
Source file name recorded with the allocation (usually FILE). |
line |
Source line recorded with the allocation (usually LINE). |
Created with MrDocs