safec
3.2
Safe C Library - ISO TR24731 Bounds Checking Interface
|
#include "safe_str_lib.h"
Functions | |
EXPORT errno_t | strcat_s (char *restrict dest, rsize_t dmax, const char *restrict src) |
The strcat_s function appends a copy of the string pointed to by src (including the terminating null character) to the end of the string pointed to by dest. More... | |
The strcat_s function appends a copy of the string pointed to by src (including the terminating null character) to the end of the string pointed to by dest.
The initial character from src overwrites the null character at the end ofdest.
All elements following the terminating null character (if any) written by strcat_s in the array of dmax characters pointed to by dest take unspeciļ¬ed values when strcat_s returns. With SAFECLIB_STR_NULL_SLACK defined the rest is cleared with NULL bytes.
[out] | dest | pointer to string that will be extended by src if dmax allows. The string is null terminated. If the resulting concatenated string is less than dmax, the remaining slack space is nulled. |
[in] | dmax | restricted maximum length of the resulting dest, including the null |
[in] | src | pointer to the string that will be concatenaed to string dest |
EOK | when successful operation, all the characters from src were appended to dest and the result in dest is null terminated. |
ESNULLP | when dest or src is a NULL pointer |
ESZEROL | when dmax = 0 |
ESLEMAX | when dmax > RSIZE_MAX_STR |
ESUNTERM | when dest not terminated in the first dmax bytes |
ESOVRLP | when src overlaps with dest |