[PATCH] D34656: [msan] Intercept wcscat, wcsncat.
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 26 17:34:22 PDT 2017
vitalybuka added a comment.
Why strncat is not in common?
================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:6215
+ SIZE_T res = REAL(wcsnlen)(s, n);
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, s, sizeof(wchar_t) * Min(res + 1, n));
+ return res;
----------------
you need to handle strict_string_checks
Probably new macro COMMON_INTERCEPTOR_READ_WSTRING is needed
================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:6243
+ SIZE_T dst_size = REAL(wcslen)(dst);
+ COMMON_INTERCEPTOR_READ_RANGE(ctx, src,
+ Min(src_size + 1, n) * sizeof(wchar_t));
----------------
COMMON_INTERCEPTOR_READ_WSTRING
https://reviews.llvm.org/D34656
More information about the llvm-commits
mailing list