Adding upstream version 3.1.0+dfsg.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
64dbec996d
commit
cfcebb1a7d
569 changed files with 205393 additions and 0 deletions
47
tests/fuzz/main.c
Normal file
47
tests/fuzz/main.c
Normal file
|
@ -0,0 +1,47 @@
|
|||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int LLVMFuzzerTestOneInput(uint8_t const *buf, size_t len);
|
||||
|
||||
#ifdef __AFL_COMPILER
|
||||
|
||||
int main(void) {
|
||||
int ret;
|
||||
uint8_t buf[64 * 1024];
|
||||
|
||||
#ifdef __AFL_LOOP
|
||||
while (__AFL_LOOP(10000))
|
||||
#endif
|
||||
{
|
||||
ret = fread(buf, 1, sizeof(buf), stdin);
|
||||
if (ret < 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
LLVMFuzzerTestOneInput(buf, ret);
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
int ret;
|
||||
uint8_t buf[64 * 1024];
|
||||
|
||||
ret = fread(buf, 1, sizeof(buf), stdin);
|
||||
if (ret < 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
LLVMFuzzerTestOneInput(buf, ret);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* __AFL_COMPILER */
|
Loading…
Add table
Add a link
Reference in a new issue