Home
last modified time | relevance | path

Searched refs:strDest (Results 1 - 22 of 22) 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), (strSr
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
48 strDest[0] = '\0'; 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()
66 if (strDest != NULL) { in strncpy_error()
67 strDest[ in strncpy_error()
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
24 SECUREC_CALC_STR_LEN(strDest, destMax, &destLen); in SecDoCatLimit()
31 if (SECUREC_CAT_STRING_IS_OVERLAP(strDest, destLen, strSrc, srcLen)) { in SecDoCatLimit()
32 strDest[0] = '\0'; in SecDoCatLimit()
33 if (strDest + destLen <= strSrc && destLen == destMax) { in SecDoCatLimit()
40 if (srcLen + destLen >= destMax || strDest == strSrc) { in SecDoCatLimit()
41 strDest[0] = '\0'; in SecDoCatLimit()
49 SECUREC_MEMCPY_WARP_OPT(strDest + destLen, strSrc, srcLen); /* No terminator */ in SecDoCatLimit()
50 *(strDest + destLen + srcLen) = '\0'; in SecDoCatLimit()
58 * from the array pointed to by strSrc to the end of the string pointed to by strDest
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
25 SECUREC_CALC_WSTR_LEN(strDest, destMax, &destLen); in SecDoCatLimitW()
28 if (SECUREC_CAT_STRING_IS_OVERLAP(strDest, destLen, strSrc, srcLen)) { in SecDoCatLimitW()
29 strDest[0] = L'\0'; in SecDoCatLimitW()
30 if (strDest + destLen <= strSrc && destLen == destMax) { in SecDoCatLimitW()
37 if (srcLen + destLen >= destMax || strDest == strSrc) { in SecDoCatLimitW()
38 strDest[0] = L'\0'; in SecDoCatLimitW()
46 SECUREC_MEMCPY_WARP_OPT(strDest + destLen, strSrc, srcLen * sizeof(wchar_t)); /* no terminator */ in SecDoCatLimitW()
47 *(strDest + destLen + srcLen) = L'\0'; in SecDoCatLimitW()
55 * from the array pointed to by strSrc to the end of the wide string pointed to by strDest
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
26 strDest[0] = L'\0'; 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()
36 *(strDest + srcStrLen) = L'\0'; in SecDoCpyLimitW()
39 strDest[0] = L'\0'; in SecDoCpyLimitW()
49 * from the array pointed to by strSrc to the array pointed to by strDest
52 * strDest Destination string.
58 * strDest i
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
25 SECUREC_CALC_STR_LEN(strDest, destMax, &destLen); in SecDoCat()
26 /* Only optimize strSrc, do not apply this function to strDest */ in SecDoCat()
30 if (SECUREC_CAT_STRING_IS_OVERLAP(strDest, destLen, strSrc, srcLen)) { in SecDoCat()
31 strDest[0] = '\0'; in SecDoCat()
32 if (strDest + destLen <= strSrc && destLen == destMax) { in SecDoCat()
39 if (srcLen + destLen >= destMax || strDest == strSrc) { in SecDoCat()
40 strDest[0] = '\0'; in SecDoCat()
48 SECUREC_MEMCPY_WARP_OPT(strDest + destLen, strSrc, srcLen + 1); /* Single character length include \0 */ in SecDoCat()
55 * to the end of the string pointed to by strDest
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
27 SECUREC_CALC_WSTR_LEN(strDest, destMax, &destLen); in SecDoCatW()
31 if (SECUREC_CAT_STRING_IS_OVERLAP(strDest, destLen, strSrc, srcLen)) { in SecDoCatW()
32 strDest[0] = L'\0'; in SecDoCatW()
33 if (strDest + destLen <= strSrc && destLen == destMax) { in SecDoCatW()
40 if (srcLen + destLen >= destMax || strDest == strSrc) { in SecDoCatW()
41 strDest[0] = L'\0'; in SecDoCatW()
50 SECUREC_MEMCPY_WARP_OPT(strDest + destLen, strSrc, (srcLen + 1) * sizeof(wchar_t)); in SecDoCatW()
58 * to the end of the wide string pointed to by strDest.
61 * The wcscat_s function appends strSrc to strDest an
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
23 strDest[0] = L'\0'; 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()
36 strDest[0] = L'\0'; in SecDoCpyW()
45 * (including the terminating null wide character) into the array pointed to by strDest
48 * strDest Destination string buffer
53 * strDest is updated.
57 * EINVAL strDest i
70 wcscpy_s(wchar_t *strDest, size_t destMax, const wchar_t *strSrc) wcscpy_s() argument
[all...]
H A Dvsnprintf_s.c24 * to by strDest and appends a terminating null.
27 * strDest Storage location for the output.
28 * destMax The size of the strDest for output.
35 * strDest is updated
42 * If there is a runtime-constraint violation, strDest[0] will be set to the '\0' when strDest and destMax valid
44 int vsnprintf_s(char *strDest, size_t destMax, size_t count, const char *format, va_list argList) in vsnprintf_s() argument
48 if (SECUREC_VSNPRINTF_PARAM_ERROR(format, strDest, destMax, count, SECUREC_STRING_MAX_LEN)) { in vsnprintf_s()
49 SECUREC_VSPRINTF_CLEAR_DEST(strDest, destMax, SECUREC_STRING_MAX_LEN); in vsnprintf_s()
55 retVal = SecVsnprintfImpl(strDest, coun in vsnprintf_s()
112 vsnprintf_truncated_s(char *strDest, size_t destMax, const char *format, va_list argList) vsnprintf_truncated_s() argument
[all...]
H A Dsecureprintoutput.h120 #define SECUREC_VSPRINTF_PARAM_ERROR(format, strDest, destMax, maxLimit) \
121 ((format) == NULL || (strDest) == NULL || (destMax) == 0 || (destMax) > (maxLimit))
123 #define SECUREC_VSPRINTF_CLEAR_DEST(strDest, destMax, maxLimit) do { \
124 if ((strDest) != NULL && (destMax) > 0 && (destMax) <= (maxLimit)) { \
125 *(strDest) = '\0'; \
130 #define SECUREC_VSNPRINTF_PARAM_ERROR(format, strDest, destMax, count, maxLimit) \
131 (((format) == NULL || (strDest) == NULL || (destMax) == 0 || (destMax) > (maxLimit)) || \
135 #define SECUREC_VSNPRINTF_PARAM_ERROR(format, strDest, destMax, count, maxLimit) \
136 (((format) == NULL || (strDest) == NULL || (destMax) == 0 || (destMax) > (maxLimit)) || \
H A Dvsprintf_s.c22 * and writes the given data to the memory pointed to by strDest.
27 * strDest Storage location for the output.
28 * destMax Size of strDest
33 * strDest is updated
39 * If there is a runtime-constraint violation, strDest[0] will be set to the '\0' when strDest and destMax valid
41 int vsprintf_s(char *strDest, size_t destMax, const char *format, va_list argList) in vsprintf_s() argument
45 if (SECUREC_VSPRINTF_PARAM_ERROR(format, strDest, destMax, SECUREC_STRING_MAX_LEN)) { in vsprintf_s()
46 SECUREC_VSPRINTF_CLEAR_DEST(strDest, destMax, SECUREC_STRING_MAX_LEN); in vsprintf_s()
51 retVal = SecVsnprintfImpl(strDest, destMa in vsprintf_s()
[all...]
H A Dvswprintf_s.c26 * strDest Storage location for the output.
32 * strDest is updated
35 * return the number of wide characters stored in strDest, not counting the terminating null wide character.
38 * If there is a runtime-constraint violation, strDest[0] will be set to the '\0' when strDest and destMax valid
40 int vswprintf_s(wchar_t *strDest, size_t destMax, const wchar_t *format, va_list argList) in vswprintf_s() argument
43 if (SECUREC_VSPRINTF_PARAM_ERROR(format, strDest, destMax, SECUREC_WCHAR_STRING_MAX_LEN)) { in vswprintf_s()
44 SECUREC_VSPRINTF_CLEAR_DEST(strDest, destMax, SECUREC_WCHAR_STRING_MAX_LEN); in vswprintf_s()
49 retVal = SecVswprintfImpl(strDest, destMax, format, argList); in vswprintf_s()
51 strDest[ in vswprintf_s()
[all...]
H A Dsnprintf_s.c23 * strDest and appends a terminating null. Each argument (if any) is converted
29 * strDest Storage location for the output.
37 * strDest is updated
44 * If there is a runtime-constraint violation, strDest[0] will be set to the '\0' when strDest and destMax valid
47 int snprintf_s(char *strDest, size_t destMax, size_t count, const char *format, ...) in snprintf_s() argument
53 ret = vsnprintf_s(strDest, destMax, count, format, argList); in snprintf_s()
70 * strDest and appends a terminating null. Each argument (if any) is converted
76 * strDest Storage location for the output.
83 * strDest i
93 snprintf_truncated_s(char *strDest, size_t destMax, const char *format, ...) snprintf_truncated_s() argument
[all...]
H A Dsprintf_s.c22 * in strDest. Each argument (if any) is converted and output according to
29 * strDest Storage location for output.
35 * strDest is updated
38 * return the number of bytes stored in strDest, not counting the terminating null character.
41 * If there is a runtime-constraint violation, strDest[0] will be set to the '\0' when strDest and destMax valid
43 int sprintf_s(char *strDest, size_t destMax, const char *format, ...) in sprintf_s() argument
49 ret = vsprintf_s(strDest, destMax, format, argList); in sprintf_s()
H A Dswprintf_s.c22 * strDest Storage location for the output.
28 * strDest is updated
31 * return the number of wide characters stored in strDest, not counting the terminating null wide character.
34 * If there is a runtime-constraint violation, strDest[0] will be set to the '\0' when strDest and destMax valid
36 int swprintf_s(wchar_t *strDest, size_t destMax, const wchar_t *format, ...) in swprintf_s() argument
42 ret = vswprintf_s(strDest, destMax, format, argList); in swprintf_s()
/third_party/bounds_checking_function/include/
H A Dsecurec.h172 * the terminating null character) into the array pointed to by strDest
173 * Parameter: strDest - destination 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.
185 * Parameter: strDest - destination address
191 SECUREC_API errno_t strncpy_s(char *strDest, size_t destMax, const char *strSrc, size_t count);
197 * the terminating null character) to the end of the string pointed to by strDest.
198 * Parameter: strDest - destination address
203 SECUREC_API errno_t strcat_s(char *strDest, size_t destMax, const char *strSrc);
210 * from the array pointed to by strSrc to the end of the string pointed to by strDest
[all...]
/third_party/musl/src/hilog/linux/
H A Dvsnprintf_s_p.c198 * to by strDest and appends a terminating null.
201 * strDest Storage location for the output.
202 * destMax The size of the strDest for output.
210 * strDest is updated
217 * If there is a runtime-constraint violation, strDest[0] will be set to the '\0' when strDest and destMax valid
221 int vsnprintfp_s(char *strDest, size_t destMax, size_t count, int priv, const char *format, va_list arglist) in vsnprintfp_s() argument
225 if (format == NULL || strDest == NULL || destMax == 0 || destMax > SECUREC_STRING_MAX_LEN || in vsnprintfp_s()
227 if (strDest != NULL && destMax > 0) { in vsnprintfp_s()
228 strDest[ in vsnprintfp_s()
[all...]
H A Dvsnprintf_s_p.h26 * @param strDest - produce output according to a format ,write to the character string strDest
28 * @param count - do not write more than count bytes to strDest(not including the terminating null byte ('\0'))
36 int vsnprintfp_s(char *strDest, size_t destMax, size_t count, int priv, const char *format, va_list arglist);
/third_party/musl/porting/linux/user/src/hilog/
H A Dvsnprintf_s_p.c198 * to by strDest and appends a terminating null.
201 * strDest Storage location for the output.
202 * destMax The size of the strDest for output.
210 * strDest is updated
217 * If there is a runtime-constraint violation, strDest[0] will be set to the '\0' when strDest and destMax valid
221 int vsnprintfp_s(char *strDest, size_t destMax, size_t count, int priv, const char *format, va_list arglist) in vsnprintfp_s() argument
225 if (format == NULL || strDest == NULL || destMax == 0 || destMax > SECUREC_STRING_MAX_LEN || in vsnprintfp_s()
227 if (strDest != NULL && destMax > 0) { in vsnprintfp_s()
228 strDest[ in vsnprintfp_s()
[all...]
H A Dvsnprintf_s_p.h26 * @param strDest - produce output according to a format ,write to the character string strDest
28 * @param count - do not write more than count bytes to strDest(not including the terminating null byte ('\0'))
36 int vsnprintfp_s(char *strDest, size_t destMax, size_t count, int priv, const char *format, va_list arglist);
/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);
27 extern int sprintf_s(char *strDest, size_t destMax, const char *format, ...);
28 extern int strncpy_s(char *strDest, size_t destMax, const char *strSrc, size_t count);
/third_party/musl/libc-test/src/functionalext/unittest/
H A Dunit_test_hilog_vsnprint_f_p.c26 static int vsprintf_test(char *strDest, size_t destMax, size_t count, int priv, const char *fmt, ...) in vsprintf_test() argument
31 ret = vsnprintfp_s(strDest, destMax, count, priv, fmt, ap); in vsprintf_test()

Completed in 12 milliseconds