[PATCH] D68431: [msan] Add interceptors: crypt, crypt_r.

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 3 17:54:43 PDT 2019


eugenis marked 2 inline comments as done.
eugenis added inline comments.


================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:9593
+#if SANITIZER_INTERCEPT_CRYPT_R
+INTERCEPTOR(char *, crypt_r, char *key, char *salt, void *data) {
+  void *ctx;
----------------
vitalybuka wrote:
> why you don't check data?
we'd need a new kind of check for it, because it must all be addressable, but only one field of it is required to be initialized. I can add that...


================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:9598
+  COMMON_INTERCEPTOR_READ_RANGE(ctx, salt, internal_strlen(salt) + 1);
+  char *res = REAL(crypt)(key, salt);
+  if (res != nullptr)
----------------
vitalybuka wrote:
>  REAL(crypt_r?
good catch


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68431/new/

https://reviews.llvm.org/D68431





More information about the llvm-commits mailing list