Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compiler-rt/lib/asan/asan_interceptors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ namespace __asan {

static inline uptr MaybeRealStrnlen(const char *s, uptr maxlen) {
#if SANITIZER_INTERCEPT_STRNLEN
if (REAL(strnlen) != nullptr)
if (static_cast<bool>(REAL(strnlen)))
return REAL(strnlen)(s, maxlen);
# endif
return internal_strnlen(s, maxlen);
}

static inline uptr MaybeRealWcsnlen(const wchar_t* s, uptr maxlen) {
# if SANITIZER_INTERCEPT_WCSNLEN
if (REAL(wcsnlen) != nullptr)
if (static_cast<bool>(REAL(wcsnlen)))
return REAL(wcsnlen)(s, maxlen);
# endif
return internal_wcsnlen(s, maxlen);
Expand Down