Skip to content

Commit

Permalink
[Minor] Support gcc based ASAN
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Jun 22, 2019
1 parent 495130b commit 2c07a3a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/libutil/str_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

/**
Expand Down

0 comments on commit 2c07a3a

Please sign in to comment.