Home
last modified time | relevance | path

Searched refs:strSrc (Results 1 - 10 of 10) sorted by relevance

/third_party/bounds_checking_function/src/
H A Dstrcpy_s.c26 #define SECUREC_STRCPY_PARAM_OK(strDest, destMax, strSrc) ((destMax) > 0 && \
27 (destMax) <= SECUREC_STRING_MAX_LEN && (strDest) != NULL && (strSrc) != NULL && (strDest) != (strSrc))
34 #define SECUREC_SMALL_STR_COPY(strDest, strSrc, lenWithTerm) do { \
35 if (SECUREC_ADDR_ALIGNED_8(strDest) && SECUREC_ADDR_ALIGNED_8(strSrc)) { \
39 *(strDest) = *(strSrc); \
42 SECUREC_COPY_VALUE_BY_STRUCT((strDest), (strSrc), 2); \
45 SECUREC_COPY_VALUE_BY_STRUCT((strDest), (strSrc), 3); \
48 SECUREC_COPY_VALUE_BY_STRUCT((strDest), (strSrc), 4); \
51 SECUREC_COPY_VALUE_BY_STRUCT((strDest), (strSrc),
264 CheckSrcRange(char *strDest, size_t destMax, const char *strSrc) CheckSrcRange() argument
284 strcpy_error(char *strDest, size_t destMax, const char *strSrc) strcpy_error() argument
327 strcpy_s(char *strDest, size_t destMax, const char *strSrc) strcpy_s() argument
[all...]
H A Dstrncpy_s.c23 #define SECUREC_STRNCPY_PARAM_OK(strDest, destMax, strSrc, count) \
24 (((destMax) > 0 && (destMax) <= SECUREC_STRING_MAX_LEN && (strDest) != NULL && (strSrc) != NULL && \
27 #define SECUREC_STRNCPY_PARAM_OK(strDest, destMax, strSrc, count) \
28 (((destMax) > 0 && (destMax) <= SECUREC_STRING_MAX_LEN && (strDest) != NULL && (strSrc) != NULL && \
35 SECUREC_INLINE errno_t CheckSrcCountRange(char *strDest, size_t destMax, const char *strSrc, size_t count) in CheckSrcCountRange() argument
39 const char *endPos = strSrc; in CheckSrcCountRange()
58 errno_t strncpy_error(char *strDest, size_t destMax, const char *strSrc, size_t count) in strncpy_error() argument
64 if (strDest == NULL || strSrc == NULL) { in strncpy_error()
81 return CheckSrcCountRange(strDest, destMax, strSrc, count); in strncpy_error()
87 * from the array pointed to by strSrc t
108 strncpy_s(char *strDest, size_t destMax, const char *strSrc, size_t count) strncpy_s() argument
[all...]
H A Dstrncat_s.c20 SECUREC_INLINE errno_t SecDoCatLimit(char *strDest, size_t destMax, const char *strSrc, size_t count) in SecDoCatLimit() argument
26 * The strSrc is no longer optimized. The reason is that when count is small, in SecDoCatLimit()
29 SECUREC_CALC_STR_LEN(strSrc, count, &srcLen); in SecDoCatLimit()
31 if (SECUREC_CAT_STRING_IS_OVERLAP(strDest, destLen, strSrc, srcLen)) { in SecDoCatLimit()
33 if (strDest + destLen <= strSrc && destLen == destMax) { in SecDoCatLimit()
40 if (srcLen + destLen >= destMax || strDest == strSrc) { in SecDoCatLimit()
49 SECUREC_MEMCPY_WARP_OPT(strDest + destLen, strSrc, srcLen); /* No terminator */ in SecDoCatLimit()
58 * from the array pointed to by strSrc to the end of the string pointed to by strDest
59 * The strncat_s function try to append the first D characters of strSrc to
60 * the end of strDest, where D is the lesser of count and the length of strSrc
87 strncat_s(char *strDest, size_t destMax, const char *strSrc, size_t count) strncat_s() argument
[all...]
H A Dwcsncat_s.c20 SECUREC_INLINE errno_t SecDoCatLimitW(wchar_t *strDest, size_t destMax, const wchar_t *strSrc, size_t count) in SecDoCatLimitW() argument
26 SECUREC_CALC_WSTR_LEN(strSrc, count, &srcLen); in SecDoCatLimitW()
28 if (SECUREC_CAT_STRING_IS_OVERLAP(strDest, destLen, strSrc, srcLen)) { in SecDoCatLimitW()
30 if (strDest + destLen <= strSrc && destLen == destMax) { in SecDoCatLimitW()
37 if (srcLen + destLen >= destMax || strDest == strSrc) { in SecDoCatLimitW()
46 SECUREC_MEMCPY_WARP_OPT(strDest + destLen, strSrc, srcLen * sizeof(wchar_t)); /* no terminator */ in SecDoCatLimitW()
55 * from the array pointed to by strSrc to the end of the wide string pointed to by strDest.
57 * The wcsncat_s function try to append the first D characters of strSrc to
58 * the end of strDest, where D is the lesser of count and the length of strSrc.
68 * strSrc Nul
86 wcsncat_s(wchar_t *strDest, size_t destMax, const wchar_t *strSrc, size_t count) wcsncat_s() argument
[all...]
H A Dwcsncpy_s.c17 SECUREC_INLINE errno_t SecDoCpyLimitW(wchar_t *strDest, size_t destMax, const wchar_t *strSrc, size_t count) in SecDoCpyLimitW() argument
21 SECUREC_CALC_WSTR_LEN(strSrc, count, &srcStrLen); in SecDoCpyLimitW()
23 SECUREC_CALC_WSTR_LEN(strSrc, destMax, &srcStrLen); in SecDoCpyLimitW()
30 if (strDest == strSrc) { in SecDoCpyLimitW()
33 if (SECUREC_STRING_NO_OVERLAP(strDest, strSrc, srcStrLen)) { in SecDoCpyLimitW()
35 SECUREC_MEMCPY_WARP_OPT(strDest, strSrc, srcStrLen * sizeof(wchar_t)); in SecDoCpyLimitW()
49 * from the array pointed to by strSrc to the array pointed to by strDest
54 * strSrc Source string.
63 * EINVAL_AND_RESET strDest != NULL and strSrc is NULL and destMax != 0
67 * (destMax <= length of strSrc an
75 wcsncpy_s(wchar_t *strDest, size_t destMax, const wchar_t *strSrc, size_t count) wcsncpy_s() argument
[all...]
H A Dstrcat_s.c20 SECUREC_INLINE errno_t SecDoCat(char *strDest, size_t destMax, const char *strSrc) in SecDoCat() argument
26 /* Only optimize strSrc, do not apply this function to strDest */ in SecDoCat()
28 SECUREC_CALC_STR_LEN_OPT(strSrc, maxSrcLen, &srcLen); in SecDoCat()
30 if (SECUREC_CAT_STRING_IS_OVERLAP(strDest, destLen, strSrc, srcLen)) { in SecDoCat()
32 if (strDest + destLen <= strSrc && destLen == destMax) { in SecDoCat()
39 if (srcLen + destLen >= destMax || strDest == strSrc) { in SecDoCat()
48 SECUREC_MEMCPY_WARP_OPT(strDest + destLen, strSrc, srcLen + 1); /* Single character length include \0 */ in SecDoCat()
54 * The strcat_s function appends a copy of the string pointed to by strSrc (including the terminating null character)
56 * The initial character of strSrc overwrites the terminating null character of strDest.
65 * strSrc Nul
81 strcat_s(char *strDest, size_t destMax, const char *strSrc) strcat_s() argument
[all...]
H A Dwcscat_s.c20 SECUREC_INLINE errno_t SecDoCatW(wchar_t *strDest, size_t destMax, const wchar_t *strSrc) in SecDoCatW() argument
29 SECUREC_CALC_WSTR_LEN(strSrc, maxCount, &srcLen); in SecDoCatW()
31 if (SECUREC_CAT_STRING_IS_OVERLAP(strDest, destLen, strSrc, srcLen)) { in SecDoCatW()
33 if (strDest + destLen <= strSrc && destLen == destMax) { in SecDoCatW()
40 if (srcLen + destLen >= destMax || strDest == strSrc) { in SecDoCatW()
50 SECUREC_MEMCPY_WARP_OPT(strDest + destLen, strSrc, (srcLen + 1) * sizeof(wchar_t)); in SecDoCatW()
56 * The wcscat_s function appends a copy of the wide string pointed to by strSrc
61 * The wcscat_s function appends strSrc to strDest and terminates the resulting
62 * string with a null character. The initial character of strSrc overwrites the
72 * strSrc Nul
89 wcscat_s(wchar_t *strDest, size_t destMax, const wchar_t *strSrc) wcscat_s() argument
[all...]
H A Dwcscpy_s.c17 SECUREC_INLINE errno_t SecDoCpyW(wchar_t *strDest, size_t destMax, const wchar_t *strSrc) in SecDoCpyW() argument
20 SECUREC_CALC_WSTR_LEN(strSrc, destMax, &srcStrLen); in SecDoCpyW()
27 if (strDest == strSrc) { in SecDoCpyW()
31 if (SECUREC_STRING_NO_OVERLAP(strDest, strSrc, srcStrLen)) { in SecDoCpyW()
33 SECUREC_MEMCPY_WARP_OPT(strDest, strSrc, (srcStrLen + 1) * sizeof(wchar_t)); in SecDoCpyW()
44 * The wcscpy_s function copies the wide string pointed to by strSrc
50 * strSrc Null-terminated source string buffer.
58 * EINVAL_AND_RESET strDest != NULL and strSrc is NULL and destMax != 0
61 * ERANGE_AND_RESET destMax <= length of strSrc and strDest != strSrc
70 wcscpy_s(wchar_t *strDest, size_t destMax, const wchar_t *strSrc) wcscpy_s() argument
[all...]
/third_party/bounds_checking_function/include/
H A Dsecurec.h171 * Description: The strcpy_s function copies the string pointed to by strSrc (including
175 * Parameter: strSrc - source address
178 SECUREC_API errno_t strcpy_s(char *strDest, size_t destMax, const char *strSrc);
184 * the terminating null character) from the array pointed to by strSrc to the array pointed to by strDest.
187 * Parameter: strSrc - source address
191 SECUREC_API errno_t strncpy_s(char *strDest, size_t destMax, const char *strSrc, size_t count);
196 * Description: The strcat_s function appends a copy of the string pointed to by strSrc (including
200 * Parameter: strSrc - source address
203 SECUREC_API errno_t strcat_s(char *strDest, size_t destMax, const char *strSrc);
210 * from the array pointed to by strSrc t
[all...]
/third_party/jerryscript/jerry-core/api/
H A Dgenerate-bytecode.c24 extern int strcpy_s(char *strDest, size_t destMax, const char *strSrc);
25 extern int strcat_s(char *strDest, size_t destMax, const char *strSrc);
26 extern int strncat_s(char *strDest, size_t destMax, const char *strSrc, size_t count);
28 extern int strncpy_s(char *strDest, size_t destMax, const char *strSrc, size_t count);

Completed in 4 milliseconds