diff --git a/sys/libkern/strlen.c b/sys/libkern/strlen.c --- a/sys/libkern/strlen.c +++ b/sys/libkern/strlen.c @@ -26,9 +26,19 @@ */ #include +#include +#include #include #include +#include +#if defined(KASAN) || defined(KCSAN) || defined(KMSAN) +size_t +(strlen)(const char *str) +{ + return SAN_INTERCEPTOR(strlen)(str); +} +#else /* KASAN || KCSAN || KMSAN */ /* * Portable strlen() for 32-bit and 64-bit systems. * @@ -119,3 +129,4 @@ /* NOTREACHED */ return (0); } +#endif /* KASAN || KCSAN || KMSAN */