[PATCH] D41243: [ASan] Add interceptros for fortified strcat, strncat, strcpy, strncpy.
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 19 10:56:56 PST 2017
vitalybuka added inline comments.
================
Comment at: lib/asan/asan_interceptors.cc:359
+#if ASAN_INTERCEPT___STRCAT_CHK
+INTERCEPTOR(char*, __strcat_chk, char *to, const char *from, uptr to_size) {
+ void *ctx;
----------------
Interceptor should use to_size.
================
Comment at: lib/asan/asan_interceptors.cc:363
+ ENSURE_ASAN_INITED();
+ if (flags()->replace_str) {
+ uptr from_length = REAL(strlen)(from);
----------------
Look like all implementations are copy/paste from non _chk code. We need to extract and share common parts.
https://reviews.llvm.org/D41243
More information about the llvm-commits
mailing list