Skip to content

Commit efaa529

Browse files
authored
[sanitizer_common] Use internal_memcpy with wcrtomb/wctomb interceptors (llvm#138623)
1 parent 6a99d81 commit efaa529

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3917,7 +3917,7 @@ INTERCEPTOR(SIZE_T, wcrtomb, char *dest, wchar_t src, void *ps) {
39173917
if (res != ((SIZE_T)-1)) {
39183918
CHECK_LE(res, sizeof(local_dest));
39193919
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, dest, res);
3920-
REAL(memcpy)(dest, local_dest, res);
3920+
internal_memcpy(dest, local_dest, res);
39213921
}
39223922
return res;
39233923
}
@@ -3939,7 +3939,7 @@ INTERCEPTOR(int, wctomb, char *dest, wchar_t src) {
39393939
if (res != -1) {
39403940
CHECK_LE(res, sizeof(local_dest));
39413941
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, dest, res);
3942-
REAL(memcpy)(dest, local_dest, res);
3942+
internal_memcpy(dest, local_dest, res);
39433943
}
39443944
return res;
39453945
}

0 commit comments

Comments
 (0)