Lines Matching refs:strDest

20 SECUREC_INLINE errno_t SecDoCatLimit(char *strDest, size_t destMax, const char *strSrc, size_t count)
24 SECUREC_CALC_STR_LEN(strDest, destMax, &destLen);
31 if (SECUREC_CAT_STRING_IS_OVERLAP(strDest, destLen, strSrc, srcLen)) {
32 strDest[0] = '\0';
33 if (strDest + destLen <= strSrc && destLen == destMax) {
40 if (srcLen + destLen >= destMax || strDest == strSrc) {
41 strDest[0] = '\0';
49 SECUREC_MEMCPY_WARP_OPT(strDest + destLen, strSrc, srcLen); /* No terminator */
50 *(strDest + destLen + srcLen) = '\0';
58 * from the array pointed to by strSrc to the end of the string pointed to by strDest
60 * the end of strDest, where D is the lesser of count and the length of strSrc.
61 * If appending those D characters will fit within strDest (whose size is given
63 * are appended, starting at the original terminating null of strDest, and a
64 * new terminating null is appended; otherwise, strDest[0] is set to the null
68 * strDest Null-terminated destination string.
74 * strDest is updated
78 * EINVAL strDest is NULL and destMax != 0 and destMax <= SECUREC_STRING_MAX_LEN
79 * EINVAL_AND_RESET (strDest unterminated and all other parameters are valid)or
80 * (strDest != NULL and strSrc is NULL and destMax != 0 and destMax <= SECUREC_STRING_MAX_LEN)
82 * ERANGE_AND_RESET strDest have not enough space and all other parameters are valid and not overlap
85 * If there is a runtime-constraint violation, strDest[0] will be set to the '\0' when strDest and destMax valid
87 errno_t strncat_s(char *strDest, size_t destMax, const char *strSrc, size_t count)
94 if (strDest == NULL || strSrc == NULL) {
96 if (strDest != NULL) {
97 strDest[0] = '\0';
106 return SecDoCatLimit(strDest, destMax, strSrc, destMax);
109 strDest[0] = '\0';
113 return SecDoCatLimit(strDest, destMax, strSrc, count);