Skip to content

Commit ad76c7b

Browse files
committed
more error msg prefixes copy&paste errors
1 parent 7eb4510 commit ad76c7b

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

src/extstr/strcspn_s.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ EXPORT errno_t _strcspn_s_chk(const char *dest, rsize_t dmax, const char *src,
8080
const char *scan2;
8181
rsize_t smax;
8282

83-
CHK_SRC_NULL("strcmp_s", countp)
83+
CHK_SRC_NULL("strcspn_s", countp)
8484
*countp = 0;
8585

8686
CHK_DEST_NULL("strcspn_s")
@@ -107,7 +107,7 @@ EXPORT errno_t _strcspn_s_chk(const char *dest, rsize_t dmax, const char *src,
107107
if (srcbos == BOS_UNKNOWN) {
108108
BND_CHK_PTR_BOUNDS(src, slen);
109109
} else if (unlikely(slen > srcbos)) {
110-
invoke_safe_mem_constraint_handler("memcpy_s: slen exceeds src",
110+
invoke_safe_mem_constraint_handler("strcspn_s: slen exceeds src",
111111
(void *)src, EOVERFLOW);
112112
return (RCNEGATE(EOVERFLOW));
113113
}

src/extwchar/wcsicmp_s.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ EXPORT errno_t _wcsicmp_s_chk(const wchar_t *restrict dest, rsize_t dmax,
9999
CHK_DESTW_OVR("wcsicmp_s", destsz, destbos)
100100
}
101101
if (unlikely(smax > RSIZE_MAX_WSTR)) {
102-
invoke_safe_str_constraint_handler("wcscmp_s"
102+
invoke_safe_str_constraint_handler("wcsicmp_s"
103103
": smax exceeds max",
104104
(void *)src, ESLEMAX);
105105
return RCNEGATE(ESLEMAX);
@@ -108,7 +108,7 @@ EXPORT errno_t _wcsicmp_s_chk(const wchar_t *restrict dest, rsize_t dmax,
108108
BND_CHK_PTR_BOUNDS(src, srcsz);
109109
} else {
110110
if (unlikely(srcsz > srcbos)) {
111-
invoke_safe_str_constraint_handler("wcscmp_s"
111+
invoke_safe_str_constraint_handler("wcsicmp_s"
112112
": smax exceeds src",
113113
(void *)src, EOVERFLOW);
114114
return RCNEGATE(EOVERFLOW);

src/extwchar/wcsnorm_s.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ EXPORT errno_t _wcsnorm_decompose_s_chk(wchar_t *restrict dest, rsize_t dmax,
514514

515515
if (lenp)
516516
*lenp = 0;
517-
CHK_DEST_NULL("wcsfc_s")
517+
CHK_DEST_NULL("wcsnorm_s")
518518
if (unlikely(src == NULL)) {
519519
invoke_safe_str_constraint_handler("wcsnorm_s: "
520520
"src is null",

src/os/getenv_s.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ EXPORT errno_t _getenv_s_chk(size_t *restrict len, char *restrict dest,
9797
CHK_DEST_NULL("getenv_s")
9898
CHK_DMAX_ZERO("getenv_s")
9999
if (destbos == BOS_UNKNOWN) {
100-
CHK_DMAX_MAX("ctime_s", RSIZE_MAX_STR)
100+
CHK_DMAX_MAX("getenv_s", RSIZE_MAX_STR)
101101
BND_CHK_PTR_BOUNDS(dest, dmax);
102102
} else {
103-
CHK_DEST_OVR("ctime_s", destbos)
103+
CHK_DEST_OVR("getenv_s", destbos)
104104
}
105105
if (unlikely(name == NULL)) {
106106
handle_error(dest, dmax, "getenv_s: name is null", ESNULLP);

src/str/snprintf_s.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ EXPORT int snprintf_s(char *restrict dest, rsize_t dmax,
113113
return -(ESNULLP);
114114
}
115115
if (unlikely(dmax == 0)) {
116-
invoke_safe_str_constraint_handler("vsnprintf_s: dmax is zero", dest,
116+
invoke_safe_str_constraint_handler("snprintf_s: dmax is zero", dest,
117117
ESZEROL);
118118
return -ESZEROL;
119119
}

src/wchar/vfwprintf_s.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ EXPORT int vfwprintf_s(FILE *restrict stream, const wchar_t *restrict fmt,
8282
int ret;
8383

8484
if (unlikely(stream == NULL)) {
85-
invoke_safe_str_constraint_handler("vfprintf_s: stream is null", NULL,
85+
invoke_safe_str_constraint_handler("vfwprintf_s: stream is null", NULL,
8686
ESNULLP);
8787
return -(ESNULLP);
8888
}

src/wchar/wmemcpy_s.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ EXPORT errno_t _wmemcpy_s_chk(wchar_t *dest, rsize_t dlen, const wchar_t *src,
127127
if (unlikely(smax > srcbos)) {
128128
wmem_set((wmem_type *)dest, (uint32_t)dlen, 0);
129129
MEMORY_BARRIER;
130-
invoke_safe_mem_constraint_handler("wmemmove_s: slen exceeds src",
130+
invoke_safe_mem_constraint_handler("wmemcpy_s: slen exceeds src",
131131
(void *)src, EOVERFLOW);
132132
return (RCNEGATE(EOVERFLOW));
133133
}

0 commit comments

Comments
 (0)