[PATCH] D42061: Add new interceptors: strlcpy(3) and strlcat(3)
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 1 15:07:05 PST 2018
vitalybuka 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);
+ }
----------------
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.
Repository:
rL LLVM
https://reviews.llvm.org/D42061
More information about the llvm-commits
mailing list