Home
last modified time | relevance | path

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

/third_party/bounds_checking_function/src/
Dstrcpy_s.c26 #define SECUREC_STRCPY_PARAM_OK(strDest, destMax, strSrc) ((destMax) > 0 && \ argument
27 …stMax) <= SECUREC_STRING_MAX_LEN && (strDest) != NULL && (strSrc) != NULL && (strDest) != (strSrc))
34 #define SECUREC_SMALL_STR_COPY(strDest, strSrc, lenWithTerm) do { \ argument
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), 5); \
54 SECUREC_COPY_VALUE_BY_STRUCT((strDest), (strSrc), 6); \
[all …]
Dstrncpy_s.c23 #define SECUREC_STRNCPY_PARAM_OK(strDest, destMax, strSrc, count) \ argument
24 …(((destMax) > 0 && (destMax) <= SECUREC_STRING_MAX_LEN && (strDest) != NULL && (strSrc) != NULL &&…
27 #define SECUREC_STRNCPY_PARAM_OK(strDest, destMax, strSrc, count) \ argument
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… 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()
108 errno_t strncpy_s(char *strDest, size_t destMax, const char *strSrc, size_t count) in strncpy_s() argument
[all …]
Dwcsncpy_s.c17 SECUREC_INLINE errno_t SecDoCpyLimitW(wchar_t *strDest, size_t destMax, const wchar_t *strSrc, size… 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()
75 errno_t wcsncpy_s(wchar_t *strDest, size_t destMax, const wchar_t *strSrc, size_t count) in wcsncpy_s() argument
81 if (strDest == NULL || strSrc == NULL) { in wcsncpy_s()
92 return SecDoCpyLimitW(strDest, destMax, strSrc, destMax - 1); in wcsncpy_s()
105 return SecDoCpyLimitW(strDest, destMax, strSrc, count); in wcsncpy_s()
Dstrncat_s.c20 SECUREC_INLINE errno_t SecDoCatLimit(char *strDest, size_t destMax, const char *strSrc, size_t coun… in SecDoCatLimit() argument
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()
87 errno_t strncat_s(char *strDest, size_t destMax, const char *strSrc, size_t count) in strncat_s() argument
94 if (strDest == NULL || strSrc == NULL) { in strncat_s()
106 return SecDoCatLimit(strDest, destMax, strSrc, destMax); in strncat_s()
113 return SecDoCatLimit(strDest, destMax, strSrc, count); in strncat_s()
Dwcsncat_s.c20 SECUREC_INLINE errno_t SecDoCatLimitW(wchar_t *strDest, size_t destMax, const wchar_t *strSrc, size… 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()
86 errno_t wcsncat_s(wchar_t *strDest, size_t destMax, const wchar_t *strSrc, size_t count) in wcsncat_s() argument
92 if (strDest == NULL || strSrc == NULL) { in wcsncat_s()
104 return SecDoCatLimitW(strDest, destMax, strSrc, destMax); in wcsncat_s()
111 return SecDoCatLimitW(strDest, destMax, strSrc, count); in wcsncat_s()
Dstrcat_s.c20 SECUREC_INLINE errno_t SecDoCat(char *strDest, size_t destMax, const char *strSrc) in SecDoCat() argument
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 includ… in SecDoCat()
81 errno_t strcat_s(char *strDest, size_t destMax, const char *strSrc) in strcat_s() argument
87 if (strDest == NULL || strSrc == NULL) { in strcat_s()
95 return SecDoCat(strDest, destMax, strSrc); in strcat_s()
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()
89 errno_t wcscat_s(wchar_t *strDest, size_t destMax, const wchar_t *strSrc) in wcscat_s() argument
96 if (strDest == NULL || strSrc == NULL) { in wcscat_s()
105 return SecDoCatW(strDest, destMax, strSrc); in wcscat_s()
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()
70 errno_t wcscpy_s(wchar_t *strDest, size_t destMax, const wchar_t *strSrc) in wcscpy_s() argument
76 if (strDest == NULL || strSrc == NULL) { in wcscpy_s()
84 return SecDoCpyW(strDest, destMax, strSrc); in wcscpy_s()
/third_party/bounds_checking_function/include/
Dsecurec.h178 SECUREC_API errno_t strcpy_s(char *strDest, size_t destMax, const char *strSrc);
191 SECUREC_API errno_t strncpy_s(char *strDest, size_t destMax, const char *strSrc, size_t count);
203 SECUREC_API errno_t strcat_s(char *strDest, size_t destMax, const char *strSrc);
217 SECUREC_API errno_t strncat_s(char *strDest, size_t destMax, const char *strSrc, size_t count);
435 SECUREC_API errno_t wcscpy_s(wchar_t *strDest, size_t destMax, const wchar_t *strSrc);
448 SECUREC_API errno_t wcsncpy_s(wchar_t *strDest, size_t destMax, const wchar_t *strSrc, size_t count…
460 SECUREC_API errno_t wcscat_s(wchar_t *strDest, size_t destMax, const wchar_t *strSrc);
474 SECUREC_API errno_t wcsncat_s(wchar_t *strDest, size_t destMax, const wchar_t *strSrc, size_t count…
578 extern errno_t strncpy_error(char *strDest, size_t destMax, const char *strSrc, size_t count);
579 extern errno_t strcpy_error(char *strDest, size_t destMax, const char *strSrc);
/third_party/jerryscript/jerry-core/api/
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);