minor corrections

This commit is contained in:
van Hauser 2019-08-09 00:34:26 +02:00
parent 73d02f3a80
commit 41d2e7d6b6
4 changed files with 8 additions and 4 deletions

View File

@ -161,7 +161,7 @@ test_build: afl-gcc afl-as afl-showmap
./afl-showmap -m none -q -o .test-instr0 ./test-instr < /dev/null
echo 1 | ./afl-showmap -m none -q -o .test-instr1 ./test-instr
@rm -f test-instr
@cmp -s .test-instr0 .test-instr1; DR="$$?"; rm -f .test-instr0 .test-instr1; if [ "$$DR" = "0" ]; then echo; echo "Oops, the instrumentation does not seem to be behaving correctly!"; echo; echo "Please ping <lcamtuf@google.com> to troubleshoot the issue."; echo; exit 1; fi
@cmp -s .test-instr0 .test-instr1; DR="$$?"; rm -f .test-instr0 .test-instr1; if [ "$$DR" = "0" ]; then echo; echo "Oops, the instrumentation does not seem to be behaving correctly!"; echo; echo "Please post to https://github.com/vanhauser-thc/AFLplusplus/issues to troubleshoot the issue."; echo; exit 1; fi
@echo "[+] All right, the instrumentation seems to be working!"
else

View File

@ -1,5 +1,6 @@
#ifndef __AFLCOMMON_H
#define __AFLCOMMON_H
#include "types.h"
void detect_file_args(char **argv, u8 *prog_in);
#endif

View File

@ -177,7 +177,7 @@ test_build: $(PROGS)
../afl-showmap -m none -q -o .test-instr0 ./test-instr < /dev/null
echo 1 | ../afl-showmap -m none -q -o .test-instr1 ./test-instr
@rm -f test-instr
@cmp -s .test-instr0 .test-instr1; DR="$$?"; rm -f .test-instr0 .test-instr1; if [ "$$DR" = "0" ]; then echo; echo "Oops, the instrumentation does not seem to be behaving correctly!"; echo; echo "Please ping <lcamtuf@google.com> to troubleshoot the issue."; echo; exit 1; fi
@cmp -s .test-instr0 .test-instr1; DR="$$?"; rm -f .test-instr0 .test-instr1; if [ "$$DR" = "0" ]; then echo; echo "Oops, the instrumentation does not seem to be behaving correctly!"; echo; echo "Please post to https://github.com/vanhauser-thc/AFLplusplus/issues to troubleshoot the issue."; echo; exit 1; fi
@echo "[+] All right, the instrumentation seems to be working!"
all_done: test_build

View File

@ -20,9 +20,12 @@
int main(int argc, char** argv) {
char buf[8];
char buff[8];
char *buf = buff;
if (read(0, buf, sizeof(buf)) < 1) {
if (argc > 1)
buf = argv[1];
else if (read(0, buf, sizeof(buf)) < 1) {
printf("Hum?\n");
exit(1);
}