[PATCH] D54927: Add interceptors for the sha1(3) from NetBSD

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 5 01:29:26 PST 2018


vitalybuka requested changes to this revision.
vitalybuka added inline comments.
This revision now requires changes to proceed.


================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:7364
+  if (context)
+    COMMON_INTERCEPTOR_READ_RANGE(ctx, context, SHA1_CTX_sz);
+  REAL(SHA1Update)(context, data, len);
----------------
Update suppose to read and write context


================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:7369
+  void *ctx;
+  COMMON_INTERCEPTOR_ENTER(ctx, SHA1Final, digest, context);
+  REAL(SHA1Final)(digest, context);
----------------
it should at least read context, not sure about write


================
Comment at: lib/sanitizer_common/sanitizer_common_interceptors.inc:7374
+}
+INTERCEPTOR(void, SHA1Transform, u32 state[5], u8 buffer[64]) {
+  void *ctx;
----------------
this function must write something


Repository:
  rL LLVM

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

https://reviews.llvm.org/D54927





More information about the llvm-commits mailing list