mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
fuzz:afl main: run the initialisation function
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
e0dd4d0ac0
commit
fb229276e4
@ -26,10 +26,18 @@
|
||||
int main(int argc, char *argv[]) {
|
||||
int ret;
|
||||
size_t size = 0;
|
||||
int i;
|
||||
|
||||
ret = LLVMFuzzerInitialize(&argc, &argv);
|
||||
if (ret != 0) {
|
||||
printf("LLVMFuzzerInitialize returned %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
#ifdef __AFL_LOOP
|
||||
while (__AFL_LOOP(1000))
|
||||
#else
|
||||
int i;
|
||||
for (i = 1; i < argc; i++) {
|
||||
uint8_t *buf = (uint8_t *)file_load(argv[i],
|
||||
&size,
|
||||
|
Loading…
Reference in New Issue
Block a user