|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/4] tools/fuzz: add AFL stub program for x86 insn emulator fuzzer
Wei Liu writes ("[PATCH 2/4] tools/fuzz: add AFL stub program for x86 insn
emulator fuzzer"):
> This is a basic program to call into the unified fuzzing function.
...
> + fd = open(argv[1], O_RDONLY, 0);
> + assert(fd != -1);
> + size = read(fd, input, sizeof(input));
Why do you use open and read here rather than fopen and fread ?
If you use read you ought to put it in a loop to cope with potential
partial reads.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |