safec
3.2
Safe C Library - ISO TR24731 Bounds Checking Interface
|
#include "safe_str_lib.h"
Functions | |
EXPORT errno_t | strcpyfldout_s (char *dest, rsize_t dmax, const char *src, rsize_t slen) |
The strcpyfldout_s function copies slen characters from the character array pointed to by src into the string pointed to by dest. More... | |
The strcpyfldout_s function copies slen characters from the character array pointed to by src into the string pointed to by dest.
A null is included to properly termiante the dest string. The copy operation does not stop on the null character as function copies dmax characters.
[out] | dest | pointer to string that will be replaced by src. |
[in] | dmax | restricted maximum length of dest |
[in] | src | pointer to the character array to be copied to dest and null terminated. |
[in] | slen | the maximum number of characters that will be copied from the src field into the dest string. |
EOK | when successful operation |
ESNULLP | when dest/src is NULL pointer |
ESZEROL | when dmax = 0. Before C11 also with slen = 0 |
ESLEMAX | when dmax > RSIZE_MAX_STR |
ESOVRLP | when strings overlap |
ESNOSPC | when dmax < slen |