[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH for-4.10] fuzz/x86_emulate: Fix afl-harness batch mode file pointer leak
On 10/13/2017 10:06 AM, Jan Beulich wrote: >>>> On 13.10.17 at 11:00, <george.dunlap@xxxxxxxxxx> wrote: >> Changeset XXXX introduced "batch mode" to afl-harness, which allowed > > With (part of) the commit hash and the title inserted here and ... Gah. :-) > >> --- a/tools/fuzz/x86_instruction_emulator/afl-harness.c >> +++ b/tools/fuzz/x86_instruction_emulator/afl-harness.c >> @@ -99,13 +99,17 @@ int main(int argc, char **argv) >> exit(-1); >> } >> >> - if ( !feof(fp) ) >> + /* Only run the test if the input file was smaller than INPUT_SIZE >> */ >> + if ( feof(fp) ) >> + { >> + LLVMFuzzerTestOneInput(input, size); >> + } > > ... ideally with the unnecessary braces dropped here > Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> Do you really want this to look like this? if ( ... ) foo(); else { ... } -George _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |