[PATCH] D42061: Add new interceptors: strlcpy(3) and strlcat(3)
Kamil Rytarowski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 23 15:01:50 PST 2018
krytarowski added inline comments.
================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:6615
+ SIZE_T res;
+ COMMON_INTERCEPTOR_ENTER(ctx, strlcpy, dst, src, size);
+ if (src) {
----------------
vitalybuka wrote:
> maybe just?
> INTERCEPTOR(SIZE_T, strlcpy, char *dst, char *src, SIZE_T size) {
> WRAP(strncpy)(dst, src, size);
> }
>
>
But, these functions differ in behavior. strncpy(3) does not terminate a string always with a NUL-character.
Repository:
rL LLVM
https://reviews.llvm.org/D42061
More information about the llvm-commits
mailing list