diff options
author | hexcoder- <heiko@hexco.de> | 2021-02-13 23:29:04 +0100 |
---|---|---|
committer | hexcoder- <heiko@hexco.de> | 2021-02-13 23:29:04 +0100 |
commit | e45333bcf96f86b5ef0b905a8e84fad7b7cb0427 (patch) | |
tree | 30deaa24dbcc759bf03df3b1043ef1ca69f89089 /test-instr.c | |
parent | c906c042be926652aa2e2d9fb4886ee03f5d86c2 (diff) | |
parent | 9bd1e19d7f004b4da6a610b07e59f99d66bb7ec2 (diff) | |
download | afl++-e45333bcf96f86b5ef0b905a8e84fad7b7cb0427.tar.gz |
Merge branch 'dev' of https://github.com/AFLplusplus/AFLplusplus into dev
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"); |