diff --git a/config.mk b/config.mk index 340274bf..80feed43 100644 --- a/config.mk +++ b/config.mk @@ -232,8 +232,10 @@ endif ifeq ($(WITH_ASAN),yes) CC:=clang + CXX:=clang++ LOCAL_CFLAGS+=-fsanitize=address -fno-omit-frame-pointer - LOCAL_LDFLAGS+=-fsanitize=address -fno-omit-frame-pointer + LOCAL_CXXFLAGS+=-fsanitize=address -fno-omit-frame-pointer + LOCAL_LDFLAGS+=-fsanitize=address -fno-omit-frame-pointer -static-libsan endif ifeq ($(WITH_LTO),yes) diff --git a/test/lib/cpp/08-ssl-connect-cert-auth-enc.cpp b/test/lib/cpp/08-ssl-connect-cert-auth-enc.cpp index 9cab5b33..0d7aef61 100644 --- a/test/lib/cpp/08-ssl-connect-cert-auth-enc.cpp +++ b/test/lib/cpp/08-ssl-connect-cert-auth-enc.cpp @@ -10,7 +10,7 @@ static int password_callback(char* buf, int size, int rwflag, void* userdata) (void)rwflag; (void)userdata; - strncpy(buf, "password", size); + strncpy(buf, "password", (size_t )size); buf[size-1] = '\0'; return (int)strlen(buf);