Skip to content

Commit

Permalink
Avoid compiler warning in fuzztest
Browse files Browse the repository at this point in the history
  • Loading branch information
PetteriAimonen committed Feb 1, 2020
1 parent 903ae5b commit 08b8c14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/fuzztest/fuzztest.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,12 +424,12 @@ int main(int argc, char **argv)
msglen = fread(buffer, 1, g_bufsize/2, stdin);
LLVMFuzzerTestOneInput(buffer, msglen);

while (!feof(stdin))
if (!feof(stdin))
{
/* Read any leftover input data if our buffer is smaller than
* message size. */
fprintf(stderr, "Warning: input message too long\n");
fread(buffer, 1, g_bufsize, stdin);
while (fread(buffer, 1, g_bufsize, stdin) == g_bufsize);
}

free_with_check(buffer);
Expand Down

0 comments on commit 08b8c14

Please sign in to comment.