diff options
Diffstat (limited to 'src/lzf_c.c')
-rw-r--r-- | src/lzf_c.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lzf_c.c b/src/lzf_c.c index e9c69a0b8..6c117dab1 100644 --- a/src/lzf_c.c +++ b/src/lzf_c.c @@ -86,6 +86,16 @@ #define expect_false(expr) expect ((expr) != 0, 0) #define expect_true(expr) expect ((expr) != 0, 1) +#if defined(__has_attribute) +# if __has_attribute(no_sanitize) +# define NO_SANITIZE(sanitizer) __attribute__((no_sanitize(sanitizer))) +# endif +#endif + +#if !defined(NO_SANITIZE) +# define NO_SANITIZE(sanitizer) +#endif + /* * compressed format * @@ -94,7 +104,7 @@ * 111ooooo LLLLLLLL oooooooo ; backref L+8 octets, o+1=1..4096 offset * */ - +NO_SANITIZE("alignment") unsigned int lzf_compress (const void *const in_data, unsigned int in_len, void *out_data, unsigned int out_len |