From: Vsevolod Stakhov Date: Fri, 21 Jun 2019 20:13:41 +0000 (+0100) Subject: [Minor] Support gcc based ASAN X-Git-Tag: 2.0~755^2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2c07a3a16133003f278fd19b023b5cdd41ad41d7;p=rspamd.git [Minor] Support gcc based ASAN --- diff --git a/src/libutil/str_util.h b/src/libutil/str_util.h index 8e8898a32..6fbb11ccf 100644 --- a/src/libutil/str_util.h +++ b/src/libutil/str_util.h @@ -83,10 +83,18 @@ gsize rspamd_strlcpy_safe (gchar *dst, const gchar *src, gsize siz); # if __has_feature(address_sanitizer) # define rspamd_strlcpy rspamd_strlcpy_safe # else -# define rspamd_strlcpy rspamd_strlcpy_fast +# ifdef __SANITIZE_ADDRESS__ +# define rspamd_strlcpy rspamd_strlcpy_safe +# else +# define rspamd_strlcpy rspamd_strlcpy_fast +# endif # endif #else -# define rspamd_strlcpy rspamd_strlcpy_fast +# ifdef __SANITIZE_ADDRESS__ +# define rspamd_strlcpy rspamd_strlcpy_safe +# else +# define rspamd_strlcpy rspamd_strlcpy_fast +# endif #endif /**