aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/str_util.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-21 21:13:41 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-22 10:57:29 +0100
commit2c07a3a16133003f278fd19b023b5cdd41ad41d7 (patch)
treee1e46283e252c6d335b66d686bb934408b8f3178 /src/libutil/str_util.h
parent495130bf1f7e3e4743a1000babafa16a151e3124 (diff)
downloadrspamd-2c07a3a16133003f278fd19b023b5cdd41ad41d7.tar.gz
rspamd-2c07a3a16133003f278fd19b023b5cdd41ad41d7.zip
[Minor] Support gcc based ASAN
Diffstat (limited to 'src/libutil/str_util.h')
-rw-r--r--src/libutil/str_util.h12
1 files changed, 10 insertions, 2 deletions
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
/**