[PATCH] D31457: [asan] Add strndup/__strndup interceptors if targeting linux.

pierre gousseau via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 19 02:06:08 PDT 2017


pgousseau added inline comments.


================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:232
+  if (common_flags()->intercept_strndup) {                                     \
+    COMMON_INTERCEPTOR_READ_RANGE(ctx, s, Min(copy_length + 1, size));         \
+  }                                                                            \
----------------
vitalybuka wrote:
> probably should be COMMON_INTERCEPTOR_READ_STRING(ctx, s, Min(size, copy_length + 1)); 
Sounds good, I have updated the patch.


https://reviews.llvm.org/D31457





More information about the llvm-commits mailing list