From 6488400fbfe94e14f95c9d86d16987e3eac6e273 Mon Sep 17 00:00:00 2001 From: van Hauser Date: Sat, 21 Sep 2019 23:38:46 +0200 Subject: more test cases --- test/test-compcov.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 test/test-compcov.c (limited to 'test/test-compcov.c') diff --git a/test/test-compcov.c b/test/test-compcov.c new file mode 100644 index 00000000..bbad3aed --- /dev/null +++ b/test/test-compcov.c @@ -0,0 +1,29 @@ +#include +#include +#include +#include + +int main(int argc, char** argv) { + + char *buf; + + if (argc > 1) { + + if (strcmp(argv[1], "LIBTOKENCAP") == 0) + printf("your string was libtokencap\n"); + else if (strcmp(argv[1], "BUGMENOT") == 0) + printf("your string was bugmenot\n"); + else if (strcmp(argv[1], "BUFFEROVERFLOW") == 0) { + buf = malloc(16); + strcpy(buf, "TEST"); + strcat(buf, argv[1]); + printf("This will only crash with libdislocator: %s\n", buf); + return 0; + } else + printf("I do not know your string\n"); + + } + + return 0; + +} -- cgit 1.4.1