Home
last modified time | relevance | path

Searched refs:strDest (Results 1 – 25 of 25) sorted by relevance

/third_party/bounds_checking_function/src/
Dstrcpy_s.c26 #define SECUREC_STRCPY_PARAM_OK(strDest, destMax, strSrc) ((destMax) > 0 && \ argument
27 …(destMax) <= SECUREC_STRING_MAX_LEN && (strDest) != NULL && (strSrc) != NULL && (strDest) != (strS…
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
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[0] = '\0'; in strncpy_error()
[all …]
Dstrncat_s.c20 SECUREC_INLINE errno_t SecDoCatLimit(char *strDest, size_t destMax, const char *strSrc, size_t coun… 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()
87 errno_t strncat_s(char *strDest, size_t destMax, const char *strSrc, size_t count) in strncat_s() argument
[all …]
Dwcsncat_s.c20 SECUREC_INLINE errno_t SecDoCatLimitW(wchar_t *strDest, size_t destMax, const wchar_t *strSrc, size… 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()
86 errno_t wcsncat_s(wchar_t *strDest, size_t destMax, const wchar_t *strSrc, size_t count) in wcsncat_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
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()
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()
83 if (strDest != NULL) { in wcsncpy_s()
[all …]
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()
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 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()
[all …]
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()
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()
[all …]
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()
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()
78 if (strDest != NULL) { in wcscpy_s()
79 strDest[0] = L'\0'; in wcscpy_s()
[all …]
Dvsnprintf_s.c44 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, count + 1, format, argList); in vsnprintf_s()
61 retVal = SecVsnprintfImpl(strDest, destMax, format, argList); in vsnprintf_s()
70 strDest[0] = '\0'; /* Empty the dest strDest */ in vsnprintf_s()
112 int vsnprintf_truncated_s(char *strDest, size_t destMax, const char *format, va_list argList) in vsnprintf_truncated_s() argument
116 if (SECUREC_VSPRINTF_PARAM_ERROR(format, strDest, destMax, SECUREC_STRING_MAX_LEN)) { in vsnprintf_truncated_s()
117 SECUREC_VSPRINTF_CLEAR_DEST(strDest, destMax, SECUREC_STRING_MAX_LEN); in vsnprintf_truncated_s()
122 retVal = SecVsnprintfImpl(strDest, destMax, format, argList); in vsnprintf_truncated_s()
[all …]
Dsecureprintoutput.h120 #define SECUREC_VSPRINTF_PARAM_ERROR(format, strDest, destMax, maxLimit) \ argument
121 ((format) == NULL || (strDest) == NULL || (destMax) == 0 || (destMax) > (maxLimit))
123 #define SECUREC_VSPRINTF_CLEAR_DEST(strDest, destMax, maxLimit) do { \ argument
124 if ((strDest) != NULL && (destMax) > 0 && (destMax) <= (maxLimit)) { \
125 *(strDest) = '\0'; \
130 #define SECUREC_VSNPRINTF_PARAM_ERROR(format, strDest, destMax, count, maxLimit) \ argument
131 (((format) == NULL || (strDest) == NULL || (destMax) == 0 || (destMax) > (maxLimit)) || \
135 #define SECUREC_VSNPRINTF_PARAM_ERROR(format, strDest, destMax, count, maxLimit) \ argument
136 (((format) == NULL || (strDest) == NULL || (destMax) == 0 || (destMax) > (maxLimit)) || \
Dvsprintf_s.c41 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, destMax, format, argList); in vsprintf_s()
53 strDest[0] = '\0'; in vsprintf_s()
Dvswprintf_s.c40 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[0] = L'\0'; in vswprintf_s()
Dsnprintf_s.c47 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()
93 int snprintf_truncated_s(char *strDest, size_t destMax, const char *format, ...) in snprintf_truncated_s() argument
99 ret = vsnprintf_truncated_s(strDest, destMax, format, argList); in snprintf_truncated_s()
Dswprintf_s.c36 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()
Dsprintf_s.c43 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()
Doutput.inl142 SECUREC_INLINE int SecFormatFloat(char *strDest, const char *format, ...) argument
149 ret = vsprintf(strDest, format, argList);
/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);
231 SECUREC_API int vsprintf_s(char *strDest, size_t destMax, const char *format,
245 SECUREC_API int sprintf_s(char *strDest, size_t destMax, const char *format, ...) SECUREC_ATTRIBUTE…
260 SECUREC_API int vsnprintf_s(char *strDest, size_t destMax, size_t count, const char *format,
275 SECUREC_API int snprintf_s(char *strDest, size_t destMax, size_t count, const char *format,
290 SECUREC_API int vsnprintf_truncated_s(char *strDest, size_t destMax, const char *format,
302 SECUREC_API int snprintf_truncated_s(char *strDest, size_t destMax,
[all …]
/third_party/musl/porting/linux/user/src/hilog/
Dvsnprintf_s_p.c221 int vsnprintfp_s(char *strDest, size_t destMax, size_t count, int priv, const char *format, va_lis… 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[0] = '\0'; in vsnprintfp_s()
235 retVal = SecVsnprintfPImpl(strDest, count + 1, priv, format, arglist); in vsnprintfp_s()
241 retVal = SecVsnprintfPImpl(strDest, destMax, priv, format, arglist); in vsnprintfp_s()
250 strDest[0] = '\0'; /* empty the dest strDest */ in vsnprintfp_s()
Dvsnprintf_s_p.h36 int vsnprintfp_s(char *strDest, size_t destMax, size_t count, int priv, const char *format, va_list…
Doutput_p.inl61 static int SecIndirectSprintf(char *strDest, const char *format, ...) argument
68 ret = vsprintf(strDest, format, arglist);
/third_party/musl/src/hilog/linux/
Dvsnprintf_s_p.c221 int vsnprintfp_s(char *strDest, size_t destMax, size_t count, int priv, const char *format, va_lis… 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[0] = '\0'; in vsnprintfp_s()
235 retVal = SecVsnprintfPImpl(strDest, count + 1, priv, format, arglist); in vsnprintfp_s()
241 retVal = SecVsnprintfPImpl(strDest, destMax, priv, format, arglist); in vsnprintfp_s()
250 strDest[0] = '\0'; /* empty the dest strDest */ in vsnprintfp_s()
Dvsnprintf_s_p.h36 int vsnprintfp_s(char *strDest, size_t destMax, size_t count, int priv, const char *format, va_list…
Doutput_p.inl61 static int SecIndirectSprintf(char *strDest, const char *format, ...) argument
68 ret = vsprintf(strDest, format, arglist);
/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);
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/
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()