diff options
author | van Hauser <vh@thc.org> | 2021-02-15 15:20:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-15 15:20:06 +0100 |
commit | d999725de217a0adf4f936954c418ad8c8c3da2a (patch) | |
tree | a562435e463b9f9d10b8339992d85052f558e4d6 /test-instr.c | |
parent | 91f2f057e4eacab4cd3a1a11cde157e3a31470d0 (diff) | |
parent | 145c673a80878d92013882eda6ef56e6948c397b (diff) | |
download | afl++-d999725de217a0adf4f936954c418ad8c8c3da2a.tar.gz |
Merge pull request #737 from AFLplusplus/dev
push to stable
Diffstat (limited to 'test-instr.c')
-rw-r--r-- | test-instr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test-instr.c b/test-instr.c index 84ac0036..00799103 100644 --- a/test-instr.c +++ b/test-instr.c @@ -32,7 +32,8 @@ int main(int argc, char **argv) { } else { - if (argc >= 3 && strcmp(argv[1], "-f") == 0) + if (argc >= 3 && strcmp(argv[1], "-f") == 0) { + if ((fd = open(argv[2], O_RDONLY)) < 0) { fprintf(stderr, "Error: unable to open %s\n", argv[2]); @@ -40,6 +41,8 @@ int main(int argc, char **argv) { } + } + if (read(fd, buf, sizeof(buf)) < 1) { printf("Hum?\n"); |