diff options
author | Mike Frysinger <vapier@gentoo.org> | 2017-03-04 15:45:43 -0800 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-04-16 15:21:59 -0400 |
commit | d56b0a6dd878cd451ee258844fd70c2099cd19bd (patch) | |
tree | 096e4e6166fdc77a6867750704c1ea4f72dd95dc /paxinc.h | |
parent | paxldso: add support for "new" glibc cache format (diff) | |
download | pax-utils-d56b0a6dd878cd451ee258844fd70c2099cd19bd.tar.gz pax-utils-d56b0a6dd878cd451ee258844fd70c2099cd19bd.tar.bz2 pax-utils-d56b0a6dd878cd451ee258844fd70c2099cd19bd.zip |
fuzz: add basic framework for using libFuzzer
By itself, this commit doesn't do anything useful. We have to update
each tool to hook into libFuzzer, so we'll do that in follow up commits.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'paxinc.h')
-rw-r--r-- | paxinc.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -108,6 +108,12 @@ const char *strfileperms(const char *fname); #define PTR_ALIGN_DOWN(base, size) ((__typeof__(base))ALIGN_DOWN((uintptr_t)(base), (size))) #define PTR_ALIGN_UP(base, size) ((__typeof__(base))ALIGN_UP ((uintptr_t)(base), (size))) +/* Support for libFuzzer: http://llvm.org/docs/LibFuzzer.html */ +#if PAX_UTILS_LIBFUZZ +int LLVMFuzzerInitialize(__unused__ int *argc, __unused__ char ***argv); +int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size); +#endif + /* helper functions for showing errors */ extern const char *NORM, *RED, *YELLOW; void color_init(bool disable); |