[PATCH] D42061: Add new interceptors: strlcpy(3) and strlcat(3)

Kamil Rytarowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 1 15:12:28 PST 2018


krytarowski added inline comments.


================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:6734
+    SIZE_T len = REAL(strnlen)(src, size);
+    COMMON_INTERCEPTOR_READ_STRING(ctx, src, len >= size ? size : len + 1);
+  }
----------------
vitalybuka wrote:
> also please put strnlen() into macro: 
> COMMON_INTERCEPTOR_READ_STRING(ctx, src, ... strnlen() ... )
> in this case macro expansion will avoid addition strnlen in case of strict string check.
I will do it.


Repository:
  rL LLVM

https://reviews.llvm.org/D42061





More information about the llvm-commits mailing list