Index: lib/sanitizer_common/sanitizer_common_interceptors.inc =================================================================== --- lib/sanitizer_common/sanitizer_common_interceptors.inc +++ lib/sanitizer_common/sanitizer_common_interceptors.inc @@ -8435,9 +8435,10 @@ if (context) \ COMMON_INTERCEPTOR_WRITE_RANGE(ctx, context, SHA##LEN##_CTX_sz); \ } \ - INTERCEPTOR(void, SHA##LEN##_Final, u8 digest[SHA##LEN##_digest_length], \ + INTERCEPTOR(void, SHA##LEN##_Final, u8 digest[LEN/8], \ void *context) { \ void *ctx; \ + CHECK_EQ(SHA##LEN##_digest_length, LEN/8); \ COMMON_INTERCEPTOR_ENTER(ctx, SHA##LEN##_Final, digest, context); \ if (context) \ COMMON_INTERCEPTOR_READ_RANGE(ctx, context, SHA##LEN##_CTX_sz); \