diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 20:38:23 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 20:38:23 +0000 |
commit | ff6e3c025658a5fa1affd094f220b623e7e1b24b (patch) | |
tree | 9faab72d69c92d24e349d184f5869b9796f17e0c /src/tests/fuzz/lut.c | |
parent | Initial commit. (diff) | |
download | libplacebo-ff6e3c025658a5fa1affd094f220b623e7e1b24b.tar.xz libplacebo-ff6e3c025658a5fa1affd094f220b623e7e1b24b.zip |
Adding upstream version 6.338.2.upstream/6.338.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tests/fuzz/lut.c')
-rw-r--r-- | src/tests/fuzz/lut.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/tests/fuzz/lut.c b/src/tests/fuzz/lut.c new file mode 100644 index 0000000..24e5f89 --- /dev/null +++ b/src/tests/fuzz/lut.c @@ -0,0 +1,24 @@ +#include "../tests.h" + +#include <libplacebo/shaders/lut.h> + +__AFL_FUZZ_INIT(); + +#pragma clang optimize off + +int main() +{ + struct pl_custom_lut *lut; + +#ifdef __AFL_HAVE_MANUAL_CONTROL + __AFL_INIT(); +#endif + + unsigned char *buf = __AFL_FUZZ_TESTCASE_BUF; + + while (__AFL_LOOP(100000)) { + size_t len = __AFL_FUZZ_TESTCASE_LEN; + lut = pl_lut_parse_cube(NULL, (char *) buf, len); + pl_lut_free(&lut); + } +} |